pyre.units.exceptions

Module Contents

exception pyre.units.exceptions.UnitError

Bases: pyre.framework.exceptions.FrameworkError

Base class for all errors generated by this package

exception pyre.units.exceptions.ConversionError(operand, **kwds)

Bases: pyre.units.exceptions.UnitError

Exception raised when an attempt was made to convert a dimensional quantity to a float. This typically happens when a math package function is invoked with a dimensional argument

description = cannot convert unit instance to float
exception pyre.units.exceptions.CompatibilityError(operation, op1, op2, **kwds)

Bases: pyre.units.exceptions.UnitError

Exception raised when the operands of a binary operator have imcompatible units such as adding lengths to times

description = {0.operation}: {0.op1} and {0.op2} are incompatible