-
Notifications
You must be signed in to change notification settings - Fork 262
FIX: Ensure loaded GIFTI files expose writable data arrays #750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2e0f91c
to
5edbbe6
Compare
So I dug a bit into our options for finding ways of translating from B64BIN/B64GZ to a bytearray with fewer copies, but at least the out-of-the-box attempts like On the plus side, data arrays will rarely get larger than a point set (up to 163842x3 float64s) or triangle mesh (~330000x3 int32s), which will each be less than 4MB, so one or two unnecessary copies are unlikely to cause an out-of-memory error, and the XML parsing will probably be more expensive. That said, if anybody knows some clever tricks, I'm happy to hear them. This is ready for review. Travis failures will be fixed with #749. |
I tried and failed to fix this issue with However, I personally don't need the data to be writeable - the only reason I was bitten by this is because But as you said, these arrays aren't very big most of the time, so copying is unlikely to be a bottleneck. *I didn't try very hard, so may have a play with it again some time in the future. |
@pauldmccarthy Pretty much all of our image types expose writable data arrays, so I'm inclined to call their being read-only a bug. |
Codecov Report
@@ Coverage Diff @@
## maint/2.4.x #750 +/- ##
===============================================
+ Coverage 88.36% 88.37% +<.01%
===============================================
Files 188 188
Lines 23998 23986 -12
Branches 4258 4256 -2
===============================================
- Hits 21207 21197 -10
+ Misses 2103 2100 -3
- Partials 688 689 +1
Continue to review full report at Codecov.
|
Any further comments/reviews? |
Fixes #746.