cfdm.Data.to_memory

Data.to_memory(inplace=False)[source]

Bring data on disk into memory.

There is no change to data that is already in memory.

Parameters
inplace: bool, optional

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

Returns
Data or None

A copy of the data in memory, or None if the operation was in-place.

Examples

>>> f = cfdm.example_field(4)
>>> f.data
<Data(3, 26, 4): [[[290.0, ..., --]]] K>
>>> f.data.to_memory()