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: Fix NaT handling in the PyArray_CompareFunc for datetime and timedelta #20081

Merged
merged 3 commits into from Oct 10, 2021

Conversation

@charris
Copy link
Member

@charris charris commented Oct 10, 2021

Backport of #19607.

In #12658 and #15068 the sort ordering for datetime and timedelta was changed
so that NaT sorts to the end, but the internal compare array function was not
updated.

Fixes #19574.

If a test should be added for this, please let me know where.

asmeurer added 3 commits Oct 10, 2021
…edelta

In numpy#12658 and numpy#15068 the sort ordering for datetime and timedelta was changed
so that NaT sorts to the end, but the internal compare array function was not
updated.

Fixes numpy#19574.
I accidentally based it off the float compare template instead of the integer
compare template. It also now properly handles the case when both arguments
are NaT.
@charris charris added this to the 1.21.3 release milestone Oct 10, 2021
@charris charris merged commit 222dc20 into numpy:maintenance/1.21.x Oct 10, 2021
37 checks passed
Loading
@charris charris deleted the backport-19607 branch Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants