Nikeshbajaj/spkit

blackmanharris import needs to be changed

Closed this issue · 5 comments

should be changed to scipy.signal.windows in the following files.
spkit/core/fractional_processes.py
spkit/core/advance_techniques.py

May be other files.

Have this too.

File ~/src/audio_features/.venv/lib/python3.9/site-packages/spkit/core/advance_techniques.py:29
     27 import matplotlib.pyplot as plt
     28 from scipy.fftpack import fft, ifft, fftshift
---> 29 from scipy.signal import blackmanharris, triang
     30 from scipy import signal
     32 def isPower2(n):

ImportError: cannot import name 'blackmanharris' from 'scipy.signal' (/Users/j/src/audio_features/.venv/lib/python3.9/site-packages/scipy/signal/__init__.py)

i rewrite one lines in these two files and i fixed it
from scipy.signal.windows import blackmanharris, triang
this is a import error which is due to scrpy lib file location. just rewrite it.

Hi @shotgunman ,

Thanks for reporting it.
I see that the scipy version>1.12.0 has relocated the functions imports for blackmanharris, triang. However, it still works well till scipy version 1.12.0.

I will update it in new version of spkit, which is in plan to be lauched soon.

For now, a quick fix can be to downgrad scipy to 1.12.0 version or lower.
pip install scipy==1.12.0

Hope that help.

With new release version of spkit 0.0.9.6.8 this issue is fixed.