cf.Data.empty

classmethod Data.empty(shape, dtype=None, units=None, calendar=None, chunk=True)[source]

Create a new data array without initializing the elements.

Note that the mask of the returned empty data is hard.

See also

full, hardmask, ones, zeros

Parameters:
shape: int or tuple of int

The shape of the new array.

dtype: numpy.dtype or any object convertible to numpy.dtype

The data-type of the new array. By default the data-type is float.

units: str or Units

The units for the new data array.

calendar: str, optional

The calendar for reference time units.

Returns:

Data

Examples:

>>> d = cf.Data.empty((96, 73))