Release a patched version to PyPI for NumPy compatibility
Noticed that people have started employing the work around of upper bounding NumPy in their usage of mir_eval now (example) which tells me that it's high time to make a new release.
What steps are remaining to take to make mir_eval compatible with the latest NumPy again?
IIRC it's only a matter of running the GitHub Actions release workflow after bumping the version number in the code but I'm also not fully aware of relevant changes since 0.7 was built, so is it an incoming 0.8 or 0.7.1?
Something I could help with to expedite this? I'm available to help.
What steps are remaining to take to make mir_eval compatible with the latest NumPy again?
AFAIK it's really just down to replacing uses of deprecated dtype aliases (np.complex, np.float) for python builtins (complex, float). And of course, updating our CI environments to make sure that it's all tested appropriately.
When I use mir_eval.chord.encode, I got:
File "/home/lzq/anaconda3/lib/python3.12/site-packages/mir_eval/chord.py", line 513, in encode
semitone_bitmap = (semitone_bitmap > 0).astype(np.int)
^^^^^^
File "/home/lzq/anaconda3/lib/python3.12/site-packages/numpy/__init__.py", line 324, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'inf'?
It' s an unfortunate limitation that mir_eval is only compatiable with numpy<=1.20.