Repository navigation
BUG: fix comparing NaN quantity with TimeDelta object - #15830
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
c0b1e4f to
ae7e164
Compare
| assert not dt1 < dt2 | ||
| assert not dt1 <= dt2 | ||
| assert not dt1 > dt2 |
There was a problem hiding this comment.
What happens if the order is reversed? Everything still working?
There was a problem hiding this comment.
You mean inverting left and right operands ? I didn't think about it, I'll update the tests to cover all cases
776b8eb to
1123af8
Compare
mhvk
left a comment
There was a problem hiding this comment.
Looks good, thanks! I started wondering a bit about whether np.isnan should work, and whether one should explicitly test initializing with np.nan, but ended up concluding that what you have is just right: we fix the reported bug.
A question still whether one should backport this - my tendency would be not to, since it is a (small) API change as well. But happy to be convinced otherwise.
|
@mhvk - I'd say no backport and just go for 6.1 due to the small API change you mentioned. This one is not worth fighting for a backport. |
|
And the updates look good to me as well, thanks @neutrinoceros ! |
|
I see that RTD CI is still Pending. @pllim what can we do about that? |
|
I restarted RTD build. It got a weird error, hopefully transient. 🤞 |
|
Looks all green now, so let's get this in! |
Description
Fixes #15230.
The patch is inspired from @mhvk's comment in #15230 (comment)