Fix setting of NULL values in logical FITS columns#19694
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.
|
|
This is not yet ready for review |
918bb4f to
16455da
Compare
81daa26 to
51854c8
Compare
51854c8 to
cc908ea
Compare
cc908ea to
5bcba81
Compare
5bcba81 to
a3547a0
Compare
|
This is now ready for review |
|
Should we get this in for the beta? |
|
No because I don't want to rush it and I want @saimn to review. |
|
I've played around with this branch a bit. It seems to indeed enable us to write We get : I wasn't aware of this, but apparently I am unsure which option (filling-in with Side note: I'm doing |
|
Just to note it down, this doesn't address the E.g. running: prints out i.e. the masked value got silently converted to |
While it is possible to set logical column to byte string arrays (e.g.
np.array([b"F", b"\x00", b"T"]), things silently fail or error when trying to pass pythonNoneor masked arrays - e.g. using:as mentioned in #18755.
For example when trying to pass a list with True/False/None:
Or a masked array, which would make sense:
With this PR, both cases are now handled correctly:
This fix applies to both the VLAs and fixed L columns.
@saimn - do you agree this is desirable? If so, I'm flexible as to whether we call this a bugfix or a feature - I'd lean towards bugfix to avoid people running into issues in the 8.0.x branch, but I'm happy to defer to your call.
This shouldn't be backported to v7.2.x, only v8.0.x.