cf.Data.array¶

Data.
array
¶ A numpy array copy of the data.
Inplace changes to the returned numpy array do not affect the underlying dask array.
The returned numpy array has the same mask hardness and fill values as the data.
Compare with
compute
.Performance
array
causes all delayed operations to be computed. The returnednumpy
array is a deep copy of that returned by createdcompute
.See also
Examples
>>> d = cf.Data([1, 2, 3.0], 'km') >>> a = d.array >>> isinstance(a, numpy.ndarray) True >>> print(a) [ 1. 2. 3.] >>> d[0] = 99 >>> print(a[0]) 1.0 >>> a[0] = 88 >>> print(d[0]) 99.0 km
>>> d = cf.Data('2000121', units='days since 1999121') >>> print(d.array) 366 >>> print(d.datetime_array) 20001201 00:00:00