Repository navigation
Fix writing non contiguous data to a compressed HDU. - #9958
Merged
Merged
Conversation
MSeifert04
reviewed
Feb 19, 2020
pllim
reviewed
Feb 19, 2020
pllim
left a comment
Member
There was a problem hiding this comment.
Thanks, @saimn !
cc @pchanial and @Pharisaeus
Member
|
Always great to see when a super old issue is being fixed :) Thanks @saimn! |
MSeifert04
approved these changes
Feb 20, 2020
MSeifert04
left a comment
Contributor
There was a problem hiding this comment.
LGTM
It's a bit weird to do a copy (in-place). But currently it's writing weird data (if I recall correctly) so this is an immense improvement.
pllim
approved these changes
Feb 20, 2020
| hdulist.writeto(self.temp('test.fits')) | ||
|
|
||
| actual = fits.getdata(self.temp('test.fits')) | ||
| assert_equal(orig, actual) |
Member
There was a problem hiding this comment.
I wonder if exact match required for floating point comparison will come back to bite us, but let's leave it as-is for now.
Suggested change
| assert_equal(orig, actual) | |
| assert_equal(orig, actual) |
Contributor
Author
|
@MSeifert04 - The original data is restored after it has been written, and yes that means that a copy is done when the data is noncontiguous, but doing something more efficient is more difficult (#3895). |
bsipocz
pushed a commit
that referenced
this pull request
Feb 21, 2020
Fix writing non contiguous data to a compressed HDU.
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.
Fixes #2150 and fixes #9955.