units

module of dascore source

Module for handling units.

Functions

Name Description
assert_dtype_compatible_with_units Return quantity if it is compatible with dtype.
convert_units Convert units in array from one type of units to another.
get_factor_and_unit Convert a mixed unit/scaling factor to scale_factor and unit str.
get_filter_units Get a tuple for applying filter based on dimension coordinates.
get_quantity Convert a value to a pint quantity.
get_quantity_str Ensure a unit/quantity is valid and return its string representation.
get_registry Get the pint unit registry.
get_unit Convert a value to a pint unit.
invert_quantity Invert a unit.