-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: stop allowing iNaT in TimedeltaBlock methods #27411
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
Conversation
|
||
# Note: we have to do do `astype` and not view because in general we | ||
# have float result at this point, not i8 | ||
return result.astype(values.dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you not letting this then fall thru, e.g. if there is masking here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we just return result
here, at this point it is in general float64. In the calling function we're going to do a result.view(values.dtype)
, which will be incorrect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right my point is to do this later in the function after masking and checking for 0-len.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just tried that, breaks because it ends up double-masking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wouldnt hang up on this too much, since we're going to have to move this to earlier in the call stack in #27428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, if you can clean this up later would be great.
|
||
# Note: we have to do do `astype` and not view because in general we | ||
# have float result at this point, not i8 | ||
return result.astype(values.dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right my point is to do this later in the function after masking and checking for 0-len.
gentle ping; this is a blocker for some pretty nice internals simplification |
Seems reasonable to me. |
Working towards minimizing the amount of special-casing we do within internals