Skip to content

Commit

Permalink
as func
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda authored Oct 8, 2024
1 parent b8d34da commit 7a67f8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/torchmetrics/functional/audio/pesq.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ def perceptual_evaluation_speech_quality(
)
import pesq as pesq_backend

_filter_error_msg = np.vectorize(lambda x: np.issubdtype(type(x), np.number))
def _issubtype_number(x) -> bool:
return np.issubdtype(type(x), np.number)

_filter_error_msg = np.vectorize(_issubtype_number)

if fs not in (8000, 16000):
raise ValueError(f"Expected argument `fs` to either be 8000 or 16000 but got {fs}")
Expand Down

0 comments on commit 7a67f8f

Please sign in to comment.