cf.Data.dumpd

Data.dumpd()[source]

Return a serialisation of the data array.

Deprecated at version 3.14.0. Consider inspecting the dask array returned by to_dask_array instead.

See also

loadd, loads

Returns
dict

The serialisation.

Examples

>>> d = cf.Data([[1, 2, 3]], 'm')
>>> d.dumpd()
{'Partitions': [{'location': [(0, 1), (0, 3)],
                 'subarray': array([[1, 2, 3]])}],
 'units': 'm',
 '_axes': ['dim0', 'dim1'],
 '_pmshape': (),
 'dtype': dtype('int64'),
 'shape': (1, 3)}
>>> d.flip(1)
>>> d.transpose()
>>> d.Units *= 1000
>>> d.dumpd()
{'Partitions': [{'units': 'm',
                 'axes': ['dim0', 'dim1'],
                 'location': [(0, 3), (0, 1)],
                 'subarray': array([[1, 2, 3]])}],
` 'units': '1000 m',
 '_axes': ['dim1', 'dim0'],
 '_flip': ['dim1'],
 '_pmshape': (),
 'dtype': dtype('int64'),
 'shape': (3, 1)}
>>> d.dumpd()
{'Partitions': [{'units': 'm',
                 'location': [(0, 1), (0, 3)],
                 'subarray': array([[1, 2, 3]])}],
 'units': '10000 m',
 '_axes': ['dim0', 'dim1'],
 '_flip': ['dim1'],
 '_pmshape': (),
 'dtype': dtype('int64'),
 'shape': (1, 3)}
>>> e = cf.Data(loadd=d.dumpd())
>>> e.equals(d)
True