blosc2.zeros#

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

Create an array, with zero being used as the default value for uninitialized portions of the array.

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
>>> import numpy as np
>>> shape = [8, 8]
>>> chunks = [6, 5]
>>> blocks = [5, 5]
>>> dtype = np.float64
>>> # Create zeros array
>>> array = blosc2.zeros(shape, dtype=dtype, chunks=chunks, blocks=blocks)
>>> array.shape
(8, 8)
>>> array.chunks
(6, 5)
>>> array.blocks
(5, 5)
>>> array.dtype
dtype('float64')