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

Support for NumPy > 2.0.0 #114

Closed
lochhh opened this issue Sep 10, 2024 · 1 comment · Fixed by #115
Closed

Support for NumPy > 2.0.0 #114

lochhh opened this issue Sep 10, 2024 · 1 comment · Fixed by #115

Comments

@lochhh
Copy link
Contributor

lochhh commented Sep 10, 2024

In PR #107 NumPy was constrained to <2.0.0 in env.yml but not in pyproject.toml, so when sleap-io is installed via pip, the latest NumPy is installed.

This led to the following errors and deprecation warnings (in the tests):

  • AttributeError: np.string_ was removed in the NumPy 2.0 release. Use np.bytes_ instead.
  • sleap-io\sleap_io\io\video.py:151: DeprecationWarning: array_wrap must accept context and return_scalar arguments (positionally) in the future. (Deprecated NumPy 2.0)
    is_grayscale = bool(np.all(test_img[..., 0] == test_img[..., -1]))
@talmo
Copy link
Contributor

talmo commented Sep 11, 2024

Thanks @lochhh!

Merged and available in v0.1.8. Up on PyPI and will be up soon on conda-forge.

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

Successfully merging a pull request may close this issue.

2 participants