Skip to content

Commit b65b719

Browse files
committed
remove dtype from _ssmatrix conversion.
It is not necessary to enforce float and can raise ComplexWarning during casting; cf. #376
1 parent 16f419d commit b65b719

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

control/statesp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ def _ssmatrix(data, axis=1):
9898
# Convert the data into an array or matrix, as configured
9999
# If data is passed as a string, use (deprecated?) matrix constructor
100100
if config.defaults['statesp.use_numpy_matrix']:
101-
arr = np.matrix(data, dtype=float)
101+
arr = np.matrix(data)
102102
elif isinstance(data, str):
103-
arr = np.array(np.matrix(data, dtype=float))
103+
arr = np.array(np.matrix(data))
104104
else:
105-
arr = np.array(data, dtype=float)
105+
arr = np.array(data)
106106
ndim = arr.ndim
107107
shape = arr.shape
108108

0 commit comments

Comments
 (0)