concatenate#
- class brainunit.math.concatenate(arrays, axis=None, dtype=None, **kwargs)#
Join a sequence of quantities or arrays along an existing axis.
- Parameters:
arrays (
Sequence[Array|ndarray|bool|number|bool|int|float|complex] |Sequence[saiunit.Quantity]) – The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default).axis (
int|None) – The axis along which the arrays will be joined. Default is 0.dtype (
str|type[Any] |dtype|SupportsDType|None) – If provided, the concatenation will be done using this dtype. Otherwise, the array with the highest precision will be used.
- Returns:
res – The concatenated array. The type of the array is the same as that of the first array passed in.
- Return type:
Array| saiunit.Quantity
Examples
>>> import saiunit as u >>> a = [1, 2] * u.second >>> b = [3, 4] * u.second >>> u.math.concatenate([a, b])