cfdm.Field.persist

Field.persist(metadata=False, inplace=False)[source]

Persist the data into memory.

This turns the underlying lazy dask array into an equivalent chunked dask array, but now with the results fully computed and in memory. This can avoid the expense of re-reading the data from disk, or re-computing it, when the data is accessed on multiple occassions.

Performance

persist causes delayed operations to be computed.

New in version (cfdm): 1.12.0.0

Parameters
metadata: bool

If True then also persist the metadata constructs. By default, metadata constructs are not changed.

inplace: bool, optional

If True then do the operation in-place and return None.

Returns
Field or None

The field construct with persisted data. If the operation was in-place then None is returned.