From a16bd1c571e961fe9a877774c16b6213f5c15e08 Mon Sep 17 00:00:00 2001 From: Matthew Pitkin Date: Fri, 12 Apr 2024 13:29:37 +0100 Subject: [PATCH] metrics.py: fix compatibility with scipy >=1.13 - closes #342 --- pyroomacoustics/metrics.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyroomacoustics/metrics.py b/pyroomacoustics/metrics.py index bd4ef6d5..2eab5895 100644 --- a/pyroomacoustics/metrics.py +++ b/pyroomacoustics/metrics.py @@ -2,7 +2,12 @@ import platform import numpy as np -from scipy.signal import hann + +try: + from scipy.signal import hann +except ImportError: + from scipy.signal.windows import hann + from scipy.stats import binom as _binom from scipy.stats import norm as _norm