-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: [nightly] np.finfo crashes for unhashable input #23867
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 8000 . We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@eendebakpt I thought we made sure to always call |
I just noticed that this also fails for the same reason when passing a numpy array to np.finfo(np.arange(4.0))
# TypeError: unhashable type: 'numpy.ndarray' |
Right, I remember being worried about something like this, but I guess the final version effectively had the problem. Maybe even a |
I will have a look, but it will take a week before I get to it |
@seberg @jakevdp I created #14847 to allow
It seems that |
In this PR we restore the functionality to call np.finfo on non-hashable objects with a dtype. Fixes #23867.
In this PR we restore the functionality to call np.finfo on non-hashable objects with a dtype. Fixes numpy#23867.
Describe the issue:
In the nightly release, if an unhashable object is passed to
np.finfo
the result is aTypeError
. In the most recent numpy release this is fine. This likely regressed in #23088Reproduce the code example:
Error message:
Runtime information:
Context for the issue:
This causes JAX unit tests to fail with the nightly numpy version: https://github.com/google/jax/actions/runs/4689008012/jobs/8310218419
The text was updated successfully, but these errors were encountered: