Skip to content

Commit f8fe08a

Browse files
committed
ndim==0 is a scalar
1 parent 4b44923 commit f8fe08a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

control/lti.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def _process_frequency_response(sys, omega, out, squeeze=None):
665665
if squeeze is None:
666666
squeeze = config.defaults['control.squeeze_frequency_response']
667667

668-
if not hasattr(omega, '__len__'):
668+
if np.asarray(omega).ndim < 1:
669669
# received a scalar x, squeeze down the array along last dim
670670
out = np.squeeze(out, axis=2)
671671

0 commit comments

Comments
 (0)