resqpy.weights_and_measures.convert_lengths¶
- resqpy.weights_and_measures.convert_lengths(a, from_units, to_units)¶
Converts values in numpy array (or a scalar) from one length unit to another, in situ if array.
- Parameters
a (numpy float array, or float) – array of length values to undergo unit conversion in situ, or a scalar
from_units (string) – the units of the data before conversion
to_units (string) – the required units
- Returns
a after unit conversion
Note
To see supported units, use: valid_uoms(quantity=’length’)