ndarray.ndim==0 is a scalar · python-control/python-control@5646146

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