Skip to content

Commit

Permalink
fixed bug in valid_audio 2d-mono
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed May 27, 2020
1 parent d557f86 commit 20a0ad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion librosa/util/utils.py
Expand Up @@ -276,7 +276,7 @@ def valid_audio(y, mono=True):
elif y.ndim > 2 or y.ndim == 0:
raise ParameterError('Audio data must have shape (samples,) or (channels, samples). '
'Received shape={}'.format(y.shape))
elif y.shape[0] < 2:
elif y.ndim == 2 and y.shape[0] < 2:
raise ParameterError('Mono data must have shape (samples,). '
'Received shape={}'.format(y.shape))

Expand Down

0 comments on commit 20a0ad8

Please sign in to comment.