blosc2.concatenate#

blosc2.concatenate(arrays: list[NDArray], /, axis=0, **kwargs: Any) NDArray#

Concatenate a list of arrays along a specified axis.

Parameters:
  • arrays (list of NDArray) – A list containing two or more NDArray instances to be concatenated.

  • axis (int, optional) – The axis along which the arrays will be concatenated. Default is 0.

  • kwargs (dict, optional) – Keyword arguments that are supported by the empty() constructor.

Returns:

out – A new NDArray containing the concatenated data.

Return type:

NDArray

Examples

>>> import blosc2
>>> import numpy as np
>>> arr1 = blosc2.arange(0, 5, dtype=np.int32)
>>> arr2 = blosc2.arange(5, 10, dtype=np.int32)
>>> result = blosc2.concatenate([arr1, arr2])
>>> print(result[:])
[0 1 2 3 4 5 6 7 8 9]