Repository navigation
Bugfix for memmap not working with Quantity - #125
Merged
WilliamJamieson merged 3 commits intoOct 24, 2022
Merged
Conversation
Contributor
Author
|
@mhvk Thank you for your note in astropy/astropy#13864 (comment). Would you mind reviewing these changes? |
Codecov Report
@@ Coverage Diff @@
## main #125 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 30 30
Lines 1017 1017
=========================================
Hits 1017 1017
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
pllim
reviewed
Oct 20, 2022
pllim
reviewed
Oct 20, 2022
WilliamJamieson
force-pushed
the
bugfix/quantity_memmap
branch
from
October 20, 2022 20:18
71d4b78 to
3888a86
Compare
mhvk
reviewed
Oct 20, 2022
| """ | ||
| Test that memmap (copy_arrays=False) works with quantities. | ||
|
|
||
| Unfortunately, this is not a simple `isinstance(obj, np.memmap)` |
There was a problem hiding this comment.
In a way I guess it is OK to test just on the actual effect -- certainly, for np.memmap, something can be an instance without an actual file backing it.
|
@WilliamJamieson - the change looks logical and the tests good! |
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.
Based on the discussion in astropy/astropy#13864, I found that we need to add the
copy=Falseflag to the array constructor and arrange for a more complicated test formemmapthan we normally require.resolves astropy/astropy#13864