Repository navigation
TST/BUG: improve portability in a doctest - #20373
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.
|
| >>> import astropy.units as u | ||
| >>> with u.preserve_dtype_by_default(): | ||
| ... q = u.Quantity([1, 2], u.ct) | ||
| ... q = u.Quantity([1, 2], u.ct, dtype="int64") |
There was a problem hiding this comment.
I wonder if it would make more sense to make an explicit int64 array with dtype (before the context) and then pass it to Quantity without the dtype and it would show the dtype really is preserved?
6a8f1d5 to
bb87139
Compare
|
This is a duplicate of #20318 that approaches the problem in a different way. We need to pick one and close the other. FYI. |
|
Oh, sorry I didn't think it would have a PR already. FWIW I prefer my approach but I wouldn't mind either way. |
|
No worries. I thought it was gonna get merged fast but it didn't and I forgot about it. My opinion is biased so I will let third-party decide. |
astrofrog
left a comment
There was a problem hiding this comment.
I personally find this one more explicit and shows we really do preserve the exact type
|
Sounds good to me. Thanks, all! |
Description
Follow up to #20273
The test as written now fails on armv7
example logs
Close #20318
AI Disclosure
None
Merge method