Allow initialization of zero-size Times for all formats#8854
Allow initialization of zero-size Times for all formats#8854taldcroft merged 3 commits intoastropy:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8854 +/- ##
==========================================
+ Coverage 86.57% 86.99% +0.41%
==========================================
Files 405 400 -5
Lines 60098 59482 -616
Branches 1100 1100
==========================================
- Hits 52032 51747 -285
+ Misses 7425 7094 -331
Partials 641 641
Continue to review full report at Codecov.
|
taldcroft
left a comment
There was a problem hiding this comment.
Looks good, just an informational question, and needs a rebase.
| flags=['refs_ok'], | ||
| op_dtypes=[object] + 5*[np.intc] + [np.double]) | ||
| flags=['refs_ok', 'zerosize_ok'], | ||
| op_dtypes=[None] + 5*[np.intc] + [np.double]) |
There was a problem hiding this comment.
What's going on with the change in op_dtypes everywhere w/r/t to the val type to None? I could not find any docs that suggest what should happen in this case.
There was a problem hiding this comment.
for inputs, None means to just take the dtype from the input. This is needed since for empty arrays, the dtype will not be object (and there is little point correcting it since no iteration will happen anyway)
|
OK, rebased |
Allow initialization of zero-size Times for all formats
Seeing astro-bot warn about #7868 again, I thought I would just take it over and make a PR that uses a bit less special-casing for zero-size (though still more than I'd like, but hard to avoid).
Milestoned this for 3.2.1 as I think it may be hard to backport.
Fixes #7866