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

BUG: Regression #18075 | Fixing Ufunc TD generation order #18751

Merged
merged 2 commits into from
Apr 12, 2021

Conversation

ganesh-k13
Copy link
Member

@ganesh-k13 ganesh-k13 commented Apr 11, 2021

RCA:

Reason: TD order of floor divide ufunc got changed. Expected signed before unsigned.
Escape Reason: Testplan gap, Execution gap

Found By:

pandas-dev/pandas#40874

UT Added: Yes

Note: Please let me know if we need to move it somewhere else

cc: @seberg

@ganesh-k13
Copy link
Member Author

ganesh-k13 commented Apr 11, 2021

Ok so a couple of doubts :) :

  1. How did an upcast happen and only for unsigned and particualry to int16 if we put uints after sints?
  2. So dispatch is not needed for all the types mentioned for a given TD?

@seberg
Copy link
Member

seberg commented Apr 11, 2021

NumPy picks the first loop that "works" right now (that is defined by "safe casting", although I don't like that way of thinking about it much). So bool can cast to anything, so that means the first loop is taken. But (especially for scalars!) the correct order is important. (I am myself now a bit confused why 0-D arrays seem cased ;), but lets not worry about it)

@charris charris merged commit 7a81299 into numpy:main Apr 12, 2021
@charris
Copy link
Member

charris commented Apr 12, 2021

Thanks @ganesh-k13 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants