block#
- class brainunit.math.block(arrays, **kwargs)#
Assemble a quantity or an array from nested lists of blocks.
- Parameters:
arrays (
Sequence[saiunit.Quantity |Array]) – Each element in arrays can itself be a nested sequence of arrays, in which case the blocks in the corresponding cells are recursively stacked as the elements of the resulting array.- Returns:
res – The array constructed from the given blocks.
- Return type:
Array| saiunit.Quantity
Examples
>>> import saiunit as u >>> a = [[1, 2], [3, 4]] * u.second >>> u.math.block(a)