control.statesp._ssmatrix

control.statesp._ssmatrix(data, axis=1, square=None, rows=None, cols=None, name=None)[source]

Convert argument to a (possibly empty) 2D state space matrix.

This function can be used to process the matrices that define a state-space system. The axis keyword argument makes it convenient to specify that if the input is a vector, it is a row (axis=1) or column (axis=0) vector.

Parameters
dataarray, list, or string

Input data defining the contents of the 2D array.

axis0 or 1

If input data is 1D, which axis to use for return object. The default is 1, corresponding to a row matrix.

squarebool, optional

If set to True, check that the input matrix is square.

rowsint, optional

If set, check that the input matrix has the given number of rows.

colsint, optional

If set, check that the input matrix has the given number of columns.

namestr, optional

Name of the state-space matrix being checked (for error messages).

Returns
arr2D array, with shape (0, 0) if a is empty