blosc2.copy#
- blosc2.copy(array: NDArray, dtype: dtype | str = None, **kwargs: Any) NDArray #
This is equivalent to
NDArray.copy()
Examples
>>> import numpy as np >>> import blosc2 >>> # Create an instance of NDArray with some data >>> original_array = blosc2.asarray(np.array([[1.1, 2.2, 3.3], [4.4, 5.5, 6.6]])) >>> # Create a copy of the array without changing dtype >>> copied_array = blosc2.copy(original_array) >>> print("Copied array (default dtype):") >>> print(copied_array) Copied array (default dtype): [[1.1 2.2 3.3] [4.4 5.5 6.6]]