-
Notifications
You must be signed in to change notification settings - Fork 23
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
scalar numeric ops with np.nan are inconsistent w.r.t. return type #368
Comments
cc @izaid |
Noted. Want to weigh in, @mwiebe? |
I perceive 11 as the proper behavior. |
11 makes sense to me as well. The choice that NaN counts as NA even when it isn't the specific tagged NaN means that the interaction between NaN and NA is a bit tricky to get all the details right. |
so let me see if I understand the model. so internally DyND uses What is the sentinel for I would think this would do think this would convert to
otherwise you have a much more complicated scenario where
|
For floating point types, there are a large number of NaNs, that all get lumped together in typical processing. One particular NaN is chosen as NA, and the rest get to stay NaN. But, for compatibility with pandas and also what I recall from R's behaviour, any NaN returns false to is_avail even when it is not the specific sentinel NA. For the latter reason, I think NaNs are currently printing as NA even though they should print as nan,and other corner cases are also wrong. It's probably worth writing out the theoretical model desired for the missing value NA/NaN interaction and some exploration of how that trips up the implementation in a design doc somewhere. |
The text was updated successfully, but these errors were encountered: