spkit icon indicating copy to clipboard operation
spkit copied to clipboard

blackmanharris import needs to be changed

Open Rascal43 opened this issue 1 year ago • 1 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.

Rascal43 avatar Apr 11 '24 19:04 Rascal43

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)

iluvcapra avatar May 06 '24 01:05 iluvcapra

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.

shotgunman avatar Jun 28 '24 06:06 shotgunman

@Nikeshbajaj

shotgunman avatar Jun 28 '24 06:06 shotgunman

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.

Nikeshbajaj avatar Jun 28 '24 14:06 Nikeshbajaj

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

Nikeshbajaj avatar Jul 22 '24 17:07 Nikeshbajaj