cfdm.NetCDF4Array.astype

NetCDF4Array.astype(dtype, **kwargs)[source]

Cast the data to a specified type.

Added in version (cfdm): 1.12.1.0

Parameters:
dtype: str or dtype

Typecode or data-type to which the array is cast.

kwargs: optional

Any other keywords accepted by np.astype.

Returns:
np.ndarray

The data with the new data type