Skip to content

Conversation

@tacaswell
Copy link
Member

The presence of this method causes the numpy float mul to use it in numpy 2.1 which results in the units not being tagged as expected and the example failing.

PR summary

PR checklist

The presence of this method causes the numpy float __mul__ to use it
in numpy 2.1 which results in the units not being tagged as expected and
the example failing.
@tacaswell tacaswell added this to the v3.9-doc milestone Aug 21, 2024
@github-actions github-actions bot added the Documentation: examples files in galleries/examples label Aug 21, 2024
@tacaswell
Copy link
Member Author

Sorry, I did this a while ago but forgot to actually open the PR!

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the docs with NumPy 2.0.1.

@QuLogic
Copy link
Member

QuLogic commented Aug 21, 2024

So the bisect points this to numpy/numpy@682cd04 via numpy/numpy#26904.

Reading through the array API docs, it seems like setting __array_priority__ higher (default is 0) may also work, in order to ensure that our __array_wrap__ method is called regardless of version, and we don't end up with a bare array. Alternatively, we could implement __array_ufunc and/or __array_function__.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants