Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blackmanharris import needs to be changed #11

Open
Rascal43 opened this issue Apr 11, 2024 · 4 comments
Open

blackmanharris import needs to be changed #11

Rascal43 opened this issue Apr 11, 2024 · 4 comments

Comments

@Rascal43
Copy link

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.

@iluvcapra
Copy link

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)

@shotgunman
Copy link

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
Copy link

@Nikeshbajaj

@Nikeshbajaj
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants