expand_dims#
- class saiunit.math.expand_dims(a, axis, **kwargs)#
Expand the shape of a quantity or an array.
- Parameters:
- Returns:
res – View of a with the number of dimensions increased by one.
- Return type:
Union[Array, saiunit.Quantity]
Examples
>>> import saiunit as u >>> a = [1, 2, 3] * u.meter >>> u.math.expand_dims(a, axis=0).shape (1, 3)