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
Change in ufunc loop selection breaks some SciPy ufuncs. #20544
Comments
Arrrrggg :((, another pit to get stuck in. Yeah, if any promotion is necessary it would find the homogeneous loop first, which somewhat assumes that there is no such thing as a bad loop, just non-ideal ones. But apparently "bad" loops exists and we can't know which one :(. But that is pretty darn annoying, does that mean we can't transition to new promotion by warning if the fallback is necessary? |
Well... I guess I can probably just get away with just removing most (all?) of the promotion, because I had to put in the more explicit reduce-workaround later and now it is probably unnecessary for the time being. An oversight on my part, sometimes is hard to see things if you dove too deep... I would like to take a moment to think about possible transitions, but I guess that may just be to force you to transition to a new API at some point (which is not available yet as it is fully experimental). |
Guess 1.22.0rc2 won't go out today :) @WarrenWeckesser Did this error just appear today, or was it there earlier. I ask because I triggered a new nightly yesterday. |
The problem occurred in scipy/scipy#15176. The CI check where the errors showed up is Linux Tests / Nightly CPython (3.10) (pull_request). That check uses a git checkout of the main branch of numpy, not a nightly numpy. |
@charris yeah, it is definitely due to the new changes, because of the addition of a new "default promoter" that was not there before. I guess I just have to revert (that part of it). On the up-side, it deletes a lot of stuff for now ;). |
Could be interesting to see if anyone else notices ;). |
Well, pandas noticed, because |
Should be fixed for the time being. Thanks. Hopefully, it is now good enough for the 1.22 release. |
Thanks @seberg, the SciPy CI check that runs with numpy's main development branch is now passing again. |
Thanks! I really hope (and think) that things should be de-facto back to before. (With the only exception that occasionally you may get a slightly more precise loop for reductions when it probably makes sense.) Unfortunately, it means we still have most of the old logic around, just repackaged a bit... |
Describe the issue:
Some scipy tests that run with the main git branch of numpy are failing because of an apparent change in the loop choice of some ufuncs.
An example is the ufunc
scipy.special.bdtr
. Here's a session where I'll demonstrate the issue.We want users to pass integers in the second argument; the signature
dld->d
represents the desired API.The function also has a loop with signature
ddd->d
, but if this loop is used, a DeprecationWarning is generated.The new problem occurs with a call such as
bdtr(1, 1, 0.5)
. Previously, this would use thedld->d
loop. With the main git branch, it uses theddd-d
loop:I don't know if this is a numpy bug, or if the scipy code is relying on behavior that cannot be guaranteed by numpy.
Reproduce the code example:
Error message:
NumPy/Python version information:
See above.
The text was updated successfully, but these errors were encountered: