@@ -456,6 +456,12 @@ def get_data(self, caching='fill'):
456
456
store in an internal cache. Future calls to ``get_data`` will return
457
457
the cached copy.
458
458
459
+ Once the data has been cached and returned from a proxy array, the
460
+ cached array can be modified by modifying the returned array, because
461
+ the returned array is a reference to the array in the cache. Regardless
462
+ of the `caching` flag, this is always true of an in-memory image (where
463
+ the image data is an array rather than an array proxy).
464
+
459
465
Parameters
460
466
----------
461
467
caching : {'fill', 'unchanged'}, optional
@@ -464,16 +470,17 @@ def get_data(self, caching='fill'):
464
470
is an array proxy, and the image data has not yet been cached, then
465
471
'fill' (the default) will read the data from the array proxy, and
466
472
store in an internal cache, so that future calls to ``get_data``
467
- will return the cached copy. If 'unchanged' then leave the cache
468
- unchanged; return the cached copy if it exists, if not, load the
469
- data from disk and return that, but without filling the cache.
473
+ will return the cached copy. If 'unchanged' then leave the current
474
+ state of caching unchanged; return the cached copy if it exists, if
475
+ not, load the data from disk and return that, but without filling
476
+ the cache.
470
477
471
478
Returns
472
479
-------
473
480
data : array
474
481
array of image data
475
482
"""
476
- if not caching in ('fill' , 'unchanged' ):
483
+ if caching not in ('fill' , 'unchanged' ):
477
484
raise ValueError ('caching value should be "fill" or "unchanged"' )
478
485
if self ._data_cache is not None :
479
486
return self ._data_cache
0 commit comments