blosc2.nans#

blosc2.nans(shape: int | tuple | list, dtype: ~numpy.dtype = <class 'numpy.float64'>, **kwargs: dict) NDArray#

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')