-
Notifications
You must be signed in to change notification settings - Fork 267
MRG: API to help modify image caching #276
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
`in_memory` property is True if image has an array as its data object, or if a proxy image has been cached.
Caching flag can take values 'fill' and 'unchanged'.
4398121
to
a8e5b82
Compare
Guys - I would really appreciate a review here. Any takers? |
nibabel/spatialimages.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
caching not in :)
Other than my minor comments LGTM, but I haven't followed the related issues too closely. |
Suggested by Eric L from PR review.
Rewrite clearer for docstring? |
Yep, thanks! |
MRG: API to help modify image caching Add 'caching='fill'|'unchanged' keyword to get_data method. Add in_memory property to tell user whether image already has an in-memory copy of the data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthew-brett Reading this explanatory paragraph, I think we failed to converge on the optimal API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha - could you say more? What were you thinking would be different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I could just be a very naive user, but I cannot figure out what this paragraph is telling me--it seems terribly complicated! I have no idea how I would go about using this flag correctly.
Can you give any help as to what the paragraph should say? Did I explain the idea of in-memory and proxy images well enough in the docs I posted and the list? @GaelVaroquaux - would you mind taking a look at this docstring? |
Just ask a few random people to read this, and see what they say (quoted from the current docstring):
|
Is this any better? #287 |
MRG: API to help modify image caching Add 'caching='fill'|'unchanged' keyword to get_data method. Add in_memory property to tell user whether image already has an in-memory copy of the data.
Add 'caching='fill'|'unchanged' keyword to
get_data
method.Add
in_memory
property to tell user whether image already has an in-memory copy of the data.