dstack#
- class saiunit.math.dstack(arrays, dtype=None, **kwargs)#
Stack quantities or arrays in sequence depth wise (along third axis).
- Parameters:
arrays (
Union[Sequence[Array|ndarray|number|bool],Sequence[saiunit.Quantity]]) – The arrays must have the same shape along all but the third axis.dtype (
Union[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:
Union[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])