blosc2.nans#

blosc2.nans(shape, dtype=<class 'numpy.float64'>, **kwargs)#

Create an array with NaNs values.

The parameters and keyword arguments are the same as for the empty() constructor.

Returns:

out – A NDArray is returned.

Return type:

NDArray

Examples

>>> import blosc2
>>> shape = [8, 8]
>>> chunks = [6, 5]
>>> # Create an array of NaNs
>>> array = blosc2.nans(shape, dtype='f8', chunks=chunks)
>>> array.shape
(8, 8)
>>> array.chunks
(6, 5)
>>> array.dtype
dtype('float64')