{{ message }}
View or index rather than explicitly set dtype and byteswap#19585
Draft
mhvk wants to merge 6 commits intoastropy:mainfrom
Draft
View or index rather than explicitly set dtype and byteswap#19585mhvk wants to merge 6 commits intoastropy:mainfrom
mhvk wants to merge 6 commits intoastropy:mainfrom
Conversation
…nd explicit unit)
Contributor
1 task
saimn
reviewed
Apr 23, 2026
| # If the raw data was a user-supplied recarray, we can't write | ||
| # unicode columns directly to the file, so we have to switch | ||
| # to a slower row-by-row write | ||
| self._writedata_by_row(fileobj) |
Contributor
There was a problem hiding this comment.
This was added long ago (4327621) in the py2/py3 epoch, I guess it used to work but seems broken now (from_columns attempts to convert unicode arrays to bytes and fails).
Contributor
There was a problem hiding this comment.
Did you check if there is a performance impact on checksum computation ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This is a follow-up of #19584, to avoid using any
dtypesetting or inplace byte-swapping inio.fits.Note that this also removes the untested private
_writedata_by_rowmethod, and blithely changes the private_get_heap_data()to do the swapping (but then, it cannot get pre-swapped data any more, since the_binary_table_byte_swaproutine is removed as well).Given that, I think this should be for 8.0, not 7.x.
Opening as draft while #19584 is being discussed.