broadcast_arrays#
- class brainunit.math.broadcast_arrays(*args, **kwargs)#
Broadcast any number of arrays against each other.
- Parameters:
*args (array_likes) – The arrays to broadcast.
- Returns:
broadcasted – These arrays are views on the original arrays. They are typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. If you need to write to the arrays, make copies first. While you can set the
writableflag True, writing to a single output value may end up changing more than one location in the output array.- Return type:
saiunit.Quantity |
Array|Sequence[saiunit.Quantity |Array]
Examples
>>> import saiunit as u >>> a = [1, 2, 3] * u.second >>> b = [[4], [5]] * u.second >>> u.math.broadcast_arrays(a, b)