blosc2.stack#
- blosc2.stack(arrays: list[NDArray], axis=0, **kwargs: Any) NDArray #
Stack multiple arrays, creating a new axis.
- Parameters:
- Returns:
out – A new NDArray containing the stacked data.
- Return type:
Examples
>>> import blosc2 >>> import numpy as np >>> arr1 = blosc2.arange(0, 6, dtype=np.int32, shape=(2,3)) >>> arr2 = blosc2.arange(6, 12, dtype=np.int32, shape=(2,3)) >>> result = blosc2.stack([arr1, arr2]) >>> print(result.shape) (2, 2, 3)