pyphot.ezunits package¶
Submodules¶
pyphot.ezunits.pint module¶
pint¶
Pint is Python module/package to define, operate and manipulate physical quantities: the product of a numerical value and a unit of measurement. It allows arithmetic operations between them and conversions from and to different units.
- copyright
2012 by Hernan E. Grecco.
- license
BSD, see LICENSE for more details.
-
exception
pyphot.ezunits.pint.
DimensionalityError
(units1, units2, dim1=None, dim2=None)[source]¶ Bases:
ValueError
Raised when trying to convert between incompatible units.
-
exception
pyphot.ezunits.pint.
UndefinedUnitError
(unit_names)[source]¶ Bases:
ValueError
Raised when the units are not defined in the unit registry.
-
class
pyphot.ezunits.pint.
UnitRegistry
(filename='', force_ndarray=False)[source]¶ Bases:
object
The unit registry stores the definitions and relationships between units.
- Parameters
filename – path of the units definition file to load. Empty to load the default definition file. None to leave the UnitRegistry empty.
force_ndarray – convert any input, scalar or not to a numpy.ndarray.
Module contents¶
pint¶
Pint is Python module/package to define, operate and manipulate physical quantities: the product of a numerical value and a unit of measurement. It allows arithmetic operations between them and conversions from and to different units.
- copyright
2012 by Hernan E. Grecco.
- license
BSD, see LICENSE for more details.