Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11.9k
BUG: ensure passingnp.dtype to itself doesn't crash#25042
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
78d0619 toac8f1f1Compareseberg commentedOct 31, 2023
It's a bit funny, I wonder if just flagging it as parametric would actually work :). To some degree, it is well defined (as in, it is identical to the user passing no dtype). But, overall, I am also happy with just doing this, I don't think we would have to fret over ever changing it in the future anyway. |
ac8f1f1 to0cb5982Comparengoldbaum commentedOct 31, 2023
It turns out this makes the test I added create a
I ended up moving the check into |
seberg commentedOct 31, 2023
Yeah, I think returning float64 there is actually completely fine after all that is what Making this an error for now here seems fine then. If anyone ever feals to relax it to return the float64, I would not be opposed at all, though! |
0cb5982 tob046293Compareseberg commentedNov 1, 2023
Thanks Nathan, let's go with this and possibly relax it if we ever find a reason for it. |
np.dtype to itself doesn't crashnp.dtype to itself doesn't crash
Uh oh!
There was an error while loading.Please reload this page.
Happy to implement other approaches but adding a check just before the crash happens seemed simplest.
Fixes#25031.