8000 MAINT: NaT (arg)min/max behavior · Issue #12797 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
8000

MAINT: NaT (arg)min/max behavior #12797

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

Closed
tylerjereddy opened this issue Jan 18, 2019 · 2 comments · Fixed by #14717
Closed

MAINT: NaT (arg)min/max behavior #12797

tylerjereddy opened this issue Jan 18, 2019 · 2 comments · Fixed by #14717

Comments

@tylerjereddy
Copy link
Contributor

As discussed in #12658, we'll want to target NaT argmin, argmax, min, and max behavior adjustments to match the bug fix in sorting described there (to match NaN behavior) with 1.17 release target.

In particular, @seberg notes (comment)

It seems currently NaT is completely ignored for min/max and argmin/argmax. I wonder if we should push to change that to be identical NaN (NaN is always returned). I guess if it that bites someone, on the up-side it probably will be loud since it points to NaT.

There is also an independend bug for argmin when it starts with NaT and has only one not NaT item at the end

@tylerjereddy tylerjereddy added the component: numpy.datetime64 (and timedelta64) label Jan 18, 2019
@tylerjereddy tylerjereddy added this to the 1.17.0 release milestone Jan 18, 2019
@seberg seberg added the 00 - Bug label Apr 5, 2019
@seberg seberg modified the milestones: 1.17.0 release, 1.18.0 release Jun 11, 2019
@zjpoh
Copy link
Member
zjpoh commented Oct 15, 2019

I can take a look at this if nobody is working on it.

@seberg
Copy link
Member
seberg commented Oct 15, 2019

Sure, sounds good, we could put this on the agenda for tomorrow.

seberg pushed a commit that referenced this issue Oct 16, 2019
As discussed, we want argmin/argmax/min/max to return NaT when it exists in the array.

I modified some previous test cases that ignores NaT. I also combined the DATETIME_argmin function with more general argmin function. So that it is consistent with argmax.

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

Successfully merging a pull request may close this issue.

3 participants
0