From 7e8c6d9eb7a8982449ef2a7494d86f4e0fd4e049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Siegfried=20G=C3=BCndert?= Date: Wed, 21 Aug 2019 16:39:03 +0200 Subject: [PATCH] Fix ImportError for factorial from scipy. --- pyfilterbank/gammatone.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyfilterbank/gammatone.py b/pyfilterbank/gammatone.py index 30cc366..8f97475 100644 --- a/pyfilterbank/gammatone.py +++ b/pyfilterbank/gammatone.py @@ -28,7 +28,10 @@ import numpy as np from numpy.fft import rfft, rfftfreq from numpy import (arange, array, pi, cos, exp, log10, ones_like, sqrt, zeros) -from scipy.misc import factorial +try: + from scipy.misc import factorial +except ImportError: + from scipy.special import factorial from scipy.signal import lfilter