cf.Data.cache_elements¶
- Data.cache_elements(_array=None)[source]¶
Create a cache of selected array elements.
Any existing cached elements are removed prior to the creation of the new cached elements.
Performance
Deriving the array elements from the Dask array (the default) can take a long time if expensive computations, possibly including a slow read from local or remote disk, is needed to find the values.
Added in version (cfdm): 1.13.0.0
See also
- Parameters:
- _array:
Noneor array_like, optional If
None(the default) then the cached elements are derived from the data stored in the Dask array. Otherwise they are derived from _array, which is assumed (but not checked) to be equivalent to the Dask array, i.e. _array must be equivalent to the array returned byarray, in terms of shape, data type, and values.
- _array:
- Returns: