-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: Fix #4476 by adding datetime64 and timedelta64 types #5455
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 #4476 by adding datetime64 and timedelta64 types #5455
Conversation
This is a second attempt to provide the pull request in the correct format, fixing technical git issues that I got wrong in #4477. |
LGTM. Needs a test, probably in You managed to recover ;) Any problems? |
I added a testcase. Should I merge the commit for fixing the problem and the commit for adding the testcase to a single commit? |
I did notice one small thing; the representation for
which is potentially going to confuse somebody in the future. But that's a different issue (should |
It does appear I have messed up again. I will try again to fix it. |
Just say no to merge, use rebase ;) That said, the only reason to rebase is 1) Clean up history, rewrite commit messages, etc. 2) PR is not mergable into master. No need to squash the two commits, but the second should begin |
655d2d6
to
077d33a
Compare
It's easy to recover from a bad merge, just |
077d33a
to
1bf5d56
Compare
1bf5d56
to
077d33a
Compare
This commit fixes bug numpy#4476 by adding the codes for the datetime64 and timedelta64 types to the `default_filler` dictionary in numpy.ma.core, used by `default_fill_value`. Also adapt checking in the `default_fill_value` to include code for timedelta64, not only datetime64.
Add a testcase `test_fillvalue_datetime_timedelta` to class `TestFillingValues` for the fix to bug numpy#4476. See commit 216fd17 and pull request numpy#5455.
077d33a
to
00ee332
Compare
Hmm, not sure how you got there, branch looks OK |
Ok. I hope it's all OK now, I undid everything and made it as two new commits. |
Do I need to do anything to keep this "up to date" as this pull request stands while the upstream/numpy main branch moves on? |
Nope, not unless the merge button turns grey and the PR cannot be merged. That is unlikely unless someone edits the same files in almost the same places. |
BUG: Fix #4476 by adding datetime64 and timedelta64 types
Merged, thanks @gerritholl . |
Add a testcase `test_fillvalue_datetime_timedelta` to class `TestFillingValues` for the fix to bug numpy#4476. See commit 216fd17 and pull request numpy#5455.
This commit fixes bug #4476 by adding the codes for the datetime64 and
timedelta64 types to the
default_filler
dictionary in numpy.ma.core,used by
default_fill_value
. Also adapt checking in thedefault_fill_value
to include code for timedelta64, not only datetime64.