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

librosa 0.10.1 incomaptible with scipy Version: 1.13.0 given the position of the hann package. #1830

Closed
AllreadyTaken opened this issue Apr 5, 2024 · 1 comment
Labels
already fixed Problems that we've already solved

Comments

@AllreadyTaken
Copy link

BEFORE POSTING A BUG REPORT Please look through existing issues (both open and closed) to see if it's already been reported or fixed!

Describe the bug
A clear and concise description of what the bug is:
Running librosa 0.10.1 from a fresh python docker leads to incompatibilities with the scipy version librosa installs.

Error:

smooth_boe = scipy.signal.convolve(localscore[beats], scipy.signal.hann(5), "same")
                                                      ^^^^^^^^^^^^^^^^^

AttributeError: module 'scipy.signal' has no attribute 'hann'

beat.py LL 505
def __trim_beats(localscore: np.ndarray, beats: np.ndarray, trim: bool) -> np.ndarray: """Remove spurious leading and trailing beats""" smooth_boe = scipy.signal.convolve(localscore[beats], scipy.signal.hann(5), "same")
in scipy 1.13.0 scipy.signal.windows.hann(5) would be correct.

To Reproduce
Setup a docker container or a venv and install librosa 0.10.1
My config was Python 3.12.2 ( vs code Dev container)
installed librosa 0.10.1

Expected behavior
Librosa either improts a scipy version where hann is in signal or updates to signal.window

Screenshots
If applicable, add screenshots to help explain your problem.

Software versions*

Python 3.12.2 (main, Mar 12 2024, 11:22:28) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.

import platform; print(platform.platform())
sys; print("Python", sys.version)
import numpy; print("NumPy", numpy.version)
import scipy; print("SciPy", scipy.version)
import librosa; print("librosa", librosa.version)

librosa.show_versions()Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.31

import sys; print("Python", sys.version)
Python 3.12.2 (main, Mar 12 2024, 11:22:28) [GCC 10.2.1 20210110]
import numpy; print("NumPy", numpy.version)
NumPy 1.26.4
import scipy; print("SciPy", scipy.version)
SciPy 1.13.0
import librosa; print("librosa", librosa.version)
librosa 0.10.1

librosa.show_versions()
INSTALLED VERSIONS


python: 3.12.2 (main, Mar 12 2024, 11:22:28) [GCC 10.2.1 20210110]

librosa: 0.10.1

audioread: 3.0.1
numpy: 1.26.4
scipy: 1.13.0
sklearn: 1.4.1.post1
joblib: 1.3.2
decorator: 5.1.1
numba: 0.59.1
soundfile: 0.12.1
pooch: v1.8.1
soxr: 0.3.7
typing_extensions: installed, no version number available
lazy_loader: 0.4
msgpack: 1.0.8

numpydoc: None
sphinx: None
sphinx_rtd_theme: None
matplotlib: None
sphinx_multiversion: None
sphinx_gallery: None
mir_eval: None
ipython: None
sphinxcontrib.rsvgconverter: None
pytest: None
pytest_mpl: None
pytest_cov: None
samplerate: None
resampy: None
presets: None
packaging: 24.0

Additional context
I dont wanna create a pull request since in the end you folks need to decide how to proceed with that :)

@bmcfee bmcfee added the already fixed Problems that we've already solved label Apr 5, 2024
@bmcfee
Copy link
Member

bmcfee commented Apr 5, 2024

This was already fixed in PR #1766 and will be included in the upcoming 0.10.2 release. (EDIT: sorry, tab-completed the wrong PR initially.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
already fixed Problems that we've already solved
Development

No branches or pull requests

2 participants