blosc2.NDArray.copy#
- NDArray.copy(dtype: dtype = None, **kwargs: dict) NDArray #
Create a copy of an array with same parameters.
- Parameters:
- Returns:
out – A NDArray with a copy of the data.
- Return type:
See also
Examples
>>> import blosc2 >>> import numpy as np >>> shape = (10, 10) >>> blocks = (10, 10) >>> dtype = np.bool_ >>> # Create a NDArray with default chunks >>> a = blosc2.zeros(shape, blocks=blocks, dtype=dtype) >>> # Get a copy with default chunks and blocks >>> b = a.copy(chunks=None, blocks=None) >>> np.array_equal(b[...], a[...]) True