flip#
- class saiunit.math.flip(m, axis=None, **kwargs)#
Reverse the order of elements in a quantity or an array along the given axis.
- Parameters:
- Returns:
res – A view of m with the entries of axis reversed. Since a view is returned, this operation is done in constant time.
- Return type:
Array| saiunit.Quantity
Examples
>>> import saiunit as u >>> a = [1, 2, 3] * u.meter >>> u.math.flip(a)