dstack#
- class brainunit.math.dstack(arrays, dtype=None, **kwargs)#
Stack quantities or arrays in sequence depth wise (along third axis).
- Parameters:
arrays (
Sequence[Array|ndarray|bool|number|bool|int|float|complex] |Sequence[saiunit.Quantity]) – The arrays must have the same shape along all but the third axis.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 array formed by stacking the given arrays.
- Return type:
Array| saiunit.Quantity
Examples
>>> import saiunit as u >>> a = [[1], [2], [3]] * u.meter >>> b = [[4], [5], [6]] * u.meter >>> u.math.dstack([a, b])