We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66bee9d commit e6f2f60Copy full SHA for e6f2f60
control/statesp.py
@@ -93,9 +93,15 @@ def _ssmatrix(data, axis=1):
93
# Convert the data into an array or matrix, as configured
94
# If data is passed as a string, use (deprecated?) matrix constructor
95
if config.defaults['statesp.use_numpy_matrix'] or isinstance(data, str):
96
- arr = np.matrix(data, dtype=float)
+ if np.isrealobj(data):
97
+ arr = np.matrix(data, dtype=float)
98
+ elif np.iscomplexobj(data):
99
+ arr = np.matrix(data, dtype=complex)
100
else:
- arr = np.array(data, dtype=float)
101
102
+ arr = np.array(data, dtype=float)
103
104
+ arr = np.array(data, dtype=complex)
105
ndim = arr.ndim
106
shape = arr.shape
107
0 commit comments