mpacts.core.units. unit

Functions and classes related to unit definitions and conversions.

copyright:2016 by Pint Authors, see AUTHORS for more details.
license:BSD, see LICENSE for more details.

In order to be able to use this module import it like this:

import mpacts.core.units.unit
#or assign it to a shorter name
import mpacts.core.units.unit as uni

_Unit

class mpacts.core.units.unit._Unit

Bases: mpacts.core.units.util.SharedRegistryObject

Implements a class to describe a unit supporting math operations.

_Unit(name, parent, **kwargs)
compare(other, op)
compatible_units(*contexts)
debug_used
default_format = u''

Default formatting string.

dimensionality

Unit’s dimensionality (e.g. {length: 1, time: -1})

dimensionless

Return true if the Unit is dimensionless.

format_babel(spec=u'', **kwspec)
systems
mpacts.core.units.unit.build_unit_class(registry)