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

silx.io.commonh5, silx.utils.array_like: Fixed numpy 2 deprecation warning #4165

Closed
wants to merge 1 commit into from

Conversation

t20100
Copy link
Member

@t20100 t20100 commented Aug 27, 2024

Checklist:


In order to avoid the following deprecation warning:

 DeprecationWarning: __array__ implementation doesn't accept a copy keyword, so passing copy=False failed. __array__ must implement 'dtype' and 'copy' keyword arguments.

this PR adds a copy argument to __array__ methods as explained in the numpy 2 migration guide:

For any __array__ method on a non-NumPy array-like object, dtype=None and copy=None keywords must be added to the signature - this will work with older NumPy versions as well

@t20100 t20100 added this to the Next release milestone Aug 27, 2024
@t20100 t20100 changed the title silxio.commonh5, silx.utils.array_like: Fixed numpy 2 deprecation warning silx.io.commonh5, silx.utils.array_like: Fixed numpy 2 deprecation warning Aug 27, 2024
@t20100 t20100 marked this pull request as draft August 28, 2024 08:35
@t20100
Copy link
Member Author

t20100 commented Sep 3, 2024

Closing as supersed by PR #4149

@t20100 t20100 closed this Sep 3, 2024
@t20100 t20100 deleted the array-copy-arg branch September 3, 2024 08:44
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 this pull request may close these issues.

1 participant