squeeze#
- class saiunit.math.squeeze(a, axis=None, **kwargs)#
Remove single-dimensional entries from the shape of a quantity or an array.
- Parameters:
- Returns:
res – An array with the same data as a, but with a lower dimension.
- Return type:
Array| saiunit.Quantity
Examples
>>> import saiunit as u >>> a = [[[1], [2], [3]]] * u.second >>> u.math.squeeze(a).shape (3,)