Skip to content

Commit

Permalink
don't clean _fft_cache in newer npumpy
Browse files Browse the repository at this point in the history
closes #13
  • Loading branch information
mrkrd committed Mar 10, 2022
1 parent b5edec9 commit 9de28ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cochlea/zilany2009/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def run_zilany2009(
spike_trains = pd.DataFrame(list(trains))


if isinstance(np.fft.fftpack._fft_cache, dict):
if hasattr(np.fft, 'fftpack') and isinstance(np.fft.fftpack._fft_cache, dict):
np.fft.fftpack._fft_cache = {}

return spike_trains
Expand Down
2 changes: 1 addition & 1 deletion cochlea/zilany2014/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def run_zilany2014(
spike_trains = pd.DataFrame(list(trains))


if isinstance(np.fft.fftpack._fft_cache, dict):
if hasattr(np.fft, 'fftpack') and isinstance(np.fft.fftpack._fft_cache, dict):
np.fft.fftpack._fft_cache = {}

return spike_trains
Expand Down
2 changes: 1 addition & 1 deletion cochlea/zilany2014/zilany2014_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def run_zilany2014_rate(
columns=columns
)

if isinstance(np.fft.fftpack._fft_cache, dict):
if hasattr(np.fft, 'fftpack') and isinstance(np.fft.fftpack._fft_cache, dict):
np.fft.fftpack._fft_cache = {}

return rates
Expand Down

0 comments on commit 9de28ef

Please sign in to comment.