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