unit_normalized#
- named_arrays.unit_normalized(a, unit_dimensionless=Unit(dimensionless), squeeze=True)#
Isolate the physical units associated with a given object, normalizing to the given dimensionless units if the object does not have associated units.
- Parameters:
a (Any) – object to isolate the units of
unit_dimensionless (float | UnitBase) – The unit to use for dimensionless objects.
squeeze (bool) – If the result is an instance of
named_arrays.AbstractVectorArray, and all the components are the same, simplify the result into a singleastropy.units.Unitinstance.
- Return type: