Skip to content

Commit

Permalink
ndarray.ndim==0 is a scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
bnavigator committed Mar 30, 2021
1 parent cdba09a commit 5646146
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion control/lti.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def _process_frequency_response(sys, omega, out, squeeze=None):
if squeeze is None:
squeeze = config.defaults['control.squeeze_frequency_response']

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

Expand Down

0 comments on commit 5646146

Please sign in to comment.