2018-08-06 20:03 UTC

SciNum

NAME
    SciNum

PACKAGE CONTENTS
    decimal
    numbers
    units

DATA
    BasicContext = Context(prec=9, rounding=ROUND_HALF_UP, Emin=-99...onBy...
    DefaultContext = Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=...ap...
    ExtendedContext = Context(prec=9, rounding=ROUND_HALF_EVEN, Emin=-...=...
    HAVE_THREADS = True
    MAX_EMAX = 999999999999999999
    MAX_PREC = 999999999999999999
    MIN_EMIN = -999999999999999999
    MIN_ETINY = -1999999999999999997
    ROUND_05UP = 'ROUND_05UP'
    ROUND_CEILING = 'ROUND_CEILING'
    ROUND_DOWN = 'ROUND_DOWN'
    ROUND_FLOOR = 'ROUND_FLOOR'
    ROUND_HALF_DOWN = 'ROUND_HALF_DOWN'
    ROUND_HALF_EVEN = 'ROUND_HALF_EVEN'
    ROUND_HALF_UP = 'ROUND_HALF_UP'
    ROUND_UP = 'ROUND_UP'
    SI_BASE_UNITS = {'A': Unit(symbol='A', name='ampere', indices=None), '...
    SI_BINARY_PREFIXES = {'Ei': Prefix(symbol='Ei', name='exbi', factor=De...
    SI_DERIVED_UNITS = {'Bq': Unit(symbol='Bq', name='becquerel', indices=...
    SI_DERIVED_UNIT_DEFINITIONS = {'Bq': Definition(symbol='Bq', units=Uni...
    SI_PREFIXES = {'E': Prefix(symbol='E', name='exa', factor=Decimal('100...
    SI_UNITS = {'A': Unit(symbol='A', name='ampere', indices=None), 'Bq': ...

SciNum.decimal

NAME
    SciNum.decimal

FUNCTIONS
    cos(x)
        Return the cosine of x as measured in radians.
        
        The Taylor series approximation works best for a small value of x.
        For larger values, first compute x = x % (2 * pi).
        
        >>> print(cos(Decimal('0.5')))
        0.8775825618903727161162815826
        >>> print(cos(0.5))
        0.87758256189
        >>> print(cos(0.5+0j))
        (0.87758256189+0j)
    
    exp(x)
        Return e raised to the power of x.  Result type matches input type.
        
        >>> print(exp(Decimal(1)))
        2.718281828459045235360287471
        >>> print(exp(Decimal(2)))
        7.389056098930650227230427461
        >>> print(exp(2.0))
        7.38905609893
        >>> print(exp(2+0j))
        (7.38905609893+0j)
    
    format_like(a, b)
        Reformat "a" to have the same number of decimal places and the same exponent
        as "b".
        
        Both strings are assumed to be in floating point format and a is assumed to
        have more lower decimal places
    
    get_digits(self)
    
    get_exponent(self)
    
    get_number_of_digits(self)
    
    pi()
        Compute Pi to the current precision.
        
        >>> print(pi())
        3.141592653589793238462643383
    
    sin(x)
        Return the sine of x as measured in radians.
        
        The Taylor series approximation works best for a small value of x.
        For larger values, first compute x = x % (2 * pi).
        
        >>> print(sin(Decimal('0.5')))
        0.4794255386042030002732879352
        >>> print(sin(0.5))
        0.479425538604
        >>> print(sin(0.5+0j))
        (0.479425538604+0j)

DATA
    BasicContext = Context(prec=9, rounding=ROUND_HALF_UP, Emin=-99...onBy...
    DefaultContext = Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=...ap...
    ExtendedContext = Context(prec=9, rounding=ROUND_HALF_EVEN, Emin=-...=...
    HAVE_THREADS = True
    MAX_EMAX = 999999999999999999
    MAX_PREC = 999999999999999999
    MIN_EMIN = -999999999999999999
    MIN_ETINY = -1999999999999999997
    ROUND_05UP = 'ROUND_05UP'
    ROUND_CEILING = 'ROUND_CEILING'
    ROUND_DOWN = 'ROUND_DOWN'
    ROUND_FLOOR = 'ROUND_FLOOR'
    ROUND_HALF_DOWN = 'ROUND_HALF_DOWN'
    ROUND_HALF_EVEN = 'ROUND_HALF_EVEN'
    ROUND_HALF_UP = 'ROUND_HALF_UP'
    ROUND_UP = 'ROUND_UP'

SciNum.numbers

NAME
    SciNum.numbers

CLASSES
    SciNum.units.WithUnits(builtins.object)
        DecimalWithUnits
        MeasuredDecimalWithUnits
        UncertainDecimalWithUnits
    builtins.object
        MeasuredDecimal
        UncertainDecimal
    
    class DecimalWithUnits(SciNum.units.WithUnits)
     |  DecimalWithUnits(value, units)
     |  
     |  A Decimal with units
     |  
     |  Method resolution order:
     |      DecimalWithUnits
     |      SciNum.units.WithUnits
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __init__(self, value, units)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |  
     |  copy(self)
     |      Return a copy.
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from SciNum.units.WithUnits:
     |  
     |  __abs__(self)
     |  
     |  __add__(self, other)
     |  
     |  __complex__(self)
     |  
     |  __eq__(self, other)
     |      Return self==value.
     |  
     |  __float__(self)
     |  
     |  __floordiv__(self, other)
     |  
     |  __format__(self, spec, *args, **kwargs)
     |      Default object formatter.
     |  
     |  __ge__(self, other)
     |      Return self>=value.
     |  
     |  __getattr__(self, attr)
     |  
     |  __gt__(self, other)
     |      Return self>value.
     |  
     |  __iadd__(self, other)
     |  
     |  __ifloordiv__(self, other)
     |  
     |  __imod__(self, other)
     |  
     |  __imul__(self, other)
     |  
     |  __int__(self)
     |  
     |  __ipow__(self, other)
     |  
     |  __isub__(self, other)
     |  
     |  __itruediv__(self, other)
     |  
     |  __le__(self, other)
     |      Return self<=value.
     |  
     |  __lt__(self, other)
     |      Return self<value.
     |  
     |  __mod__(self, other)
     |  
     |  __mul__(self, other)
     |  
     |  __ne__(self, other)
     |      Return self!=value.
     |  
     |  __neg__(self)
     |  
     |  __pos__(self)
     |  
     |  __pow__(self, other)
     |  
     |  __radd__(self, other)
     |  
     |  __repr__(self)
     |      Return repr(self).
     |  
     |  __rfloordiv__(self, other)
     |  
     |  __rmod__(self, other)
     |  
     |  __rmul__(self, other)
     |  
     |  __round__(self)
     |  
     |  __rsub__(self, other)
     |  
     |  __rtruediv__(self, other)
     |  
     |  __setattr__(self, attr, value)
     |      Implement setattr(self, name, value).
     |  
     |  __str__(self, *args, **kwargs)
     |      Return str(self).
     |  
     |  __sub__(self, other)
     |  
     |  __truediv__(self, other)
     |  
     |  reduce_to_base_units(self, base_units={'A': Unit(symbol='A', name='ampere', indices=None), 'K': Unit(symbol='K', name='kelvin', indices=None), 'cd': Unit(symbol='cd', name='candela', indices=None), 'kg': Unit(symbol='kg', name='kilogram', indices=(1, 4)), 'm': Unit(symbol='m', name='meter', indices=None), 'mol': Unit(symbol='mol', name='mole', indices=None), 's': Unit(symbol='s', name='second', indices=None)}, definitions={'Bq': Definition(symbol='Bq', units=Units({'s':-1}), factor=1), 'C': Definition(symbol='C', units=Units({'A':1,'s':1}), factor=1), '^{\\circ}C': Definition(symbol='^{\\circ}C', units=Units({'K':1}), factor=1), 'F': Definition(symbol='F', units=Units({'C':1,'V':-1}), factor=1), 'g': Definition(symbol='g', units=Units({'kg':1}), factor=Decimal('0.001')), 'Gy': Definition(symbol='Gy', units=Units({'J':1,'kg':-1}), factor=1), 'H': Definition(symbol='H', units=Units({'Wb':1,'A':-1}), factor=1), 'Hz': Definition(symbol='Hz', units=Units({'s':-1}), factor=1), 'J': Definition(symbol='J', units=Units({'N':1,'m':1}), factor=1), 'kat': Definition(symbol='kat', units=Units({'mol':1,'s':-1}), factor=1), 'lm': Definition(symbol='lm', units=Units({'cd':1,'sr':1}), factor=1), 'lx': Definition(symbol='lx', units=Units({'lm':1,'m':-2}), factor=1), 'N': Definition(symbol='N', units=Units({'kg':1,'m':1,'s':-2}), factor=1), '\\Omega': Definition(symbol='\\Omega', units=Units({'V':1,'A':-1}), factor=1), 'Pa': Definition(symbol='Pa', units=Units({'N':1,'m':-2}), factor=1), 'rad': Definition(symbol='rad', units=Units({}), factor=1), 'S': Definition(symbol='S', units=Units({'A':1,'V':-1}), factor=1), 'sr': Definition(symbol='sr', units=Units({}), factor=1), 'Sv': Definition(symbol='Sv', units=Units({'J':1,'kg':-1}), factor=1), 'T': Definition(symbol='T', units=Units({'Wb':1,'m':-2}), factor=1), 'V': Definition(symbol='V', units=Units({'W':1,'A':-1}), factor=1), 'Wb': Definition(symbol='Wb', units=Units({'V':1,'s':1}), factor=1), 'W': Definition(symbol='W', units=Units({'J':1,'s':-1}), factor=1)}, strict=True)
     |      Express this number in SI base units.
     |  
     |  substitute_units(self, definitions)
     |      Substitute the given units for others.
     |      
     |      See substitute_units().
     |  
     |  to_siunitx(self)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from SciNum.units.WithUnits:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from SciNum.units.WithUnits:
     |  
     |  __hash__ = None
    
    class MeasuredDecimal(builtins.object)
     |  MeasuredDecimal(value, precision=None)
     |  
     |  A measured decimal number with significant figures.
     |  
     |  The value is represented internally by a Decimal object.
     |  
     |  Significant figures are tracked during arithmetic operations while keeping all
     |  figures internally. This avoids the introduction of rounding errors during
     |  operations while enabling a rounded value to be extracted when needed.
     |  
     |  Methods defined here:
     |  
     |  __abs__(self)
     |  
     |  __add__(self, other)
     |  
     |  __bool__(self)
     |  
     |  __complex__(self)
     |  
     |  __eq__(self, other)
     |      Return self==value.
     |  
     |  __float__(self)
     |  
     |  __floordiv__(self, other)
     |  
     |  __format__(self, fmt)
     |      Default object formatter.
     |  
     |  __ge__(self, other)
     |      Return self>=value.
     |  
     |  __getattr__(self, attr)
     |  
     |  __gt__(self, other)
     |      Return self>value.
     |  
     |  __iadd__(self, other)
     |  
     |  __ifloordiv__(self, other)
     |  
     |  __imod__(self, other)
     |  
     |  __imul__(self, other)
     |  
     |  __init__(self, value, precision=None)
     |      Initialize a new value.
     |      
     |      "precision" is the number of significant figures in the value. If it is not
     |      given, all figures in the initial value will be considered significant.
     |  
     |  __int__(self)
     |  
     |  __ipow__(self, other)
     |  
     |  __isub__(self, other)
     |  
     |  __itruediv__(self, other)
     |  
     |  __le__(self, other)
     |      Return self<=value.
     |  
     |  __lt__(self, other)
     |      Return self<value.
     |  
     |  __mod__(self, other)
     |  
     |  __mul__(self, other)
     |  
     |  __ne__(self, other)
     |      Return self!=value.
     |  
     |  __neg__(self)
     |  
     |  __pos__(self)
     |  
     |  __pow__(self, other)
     |  
     |  __radd__(self, other)
     |  
     |  __repr__(self)
     |      Return repr(self).
     |  
     |  __rfloordiv__(self, other)
     |  
     |  __rmod__(self, other)
     |  
     |  __rmul__(self, other)
     |  
     |  __round__(self)
     |  
     |  __rsub__(self, other)
     |  
     |  __rtruediv__(self, other)
     |  
     |  __setattr__(self, attr, value)
     |      Implement setattr(self, name, value).
     |  
     |  __str__(self)
     |      Return str(self).
     |  
     |  __sub__(self, other)
     |  
     |  __truediv__(self, other)
     |  
     |  copy(self)
     |      Return a (deep) copy.
     |  
     |  get_display_value(self)
     |      Return a Decimal value with only significant figures.
     |  
     |  get_greatest_significant_place(self)
     |      Return the decimal power of the most signifant digit.
     |  
     |  get_least_significant_place(self)
     |      Return the decimal power of the most signifant digit.
     |  
     |  get_values_for_comparison(self, other)
     |      Return appropriate values for use in comparisons.
     |  
     |  to_uncertain_decimal(self)
     |  
     |  update_display_value(self)
     |      Update the display format.
     |      
     |      Mostly for internal use.
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  __hash__ = None
    
    class MeasuredDecimalWithUnits(SciNum.units.WithUnits)
     |  MeasuredDecimalWithUnits(value, units, precision=None)
     |  
     |  A MeasuredDecimal with units.
     |  
     |  Method resolution order:
     |      MeasuredDecimalWithUnits
     |      SciNum.units.WithUnits
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __init__(self, value, units, precision=None)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |  
     |  copy(self)
     |      Return a copy.
     |  
     |  to_uncertain_decimal(self)
     |      Convert to UncertainDecimalWithUnits.
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from SciNum.units.WithUnits:
     |  
     |  __abs__(self)
     |  
     |  __add__(self, other)
     |  
     |  __complex__(self)
     |  
     |  __eq__(self, other)
     |      Return self==value.
     |  
     |  __float__(self)
     |  
     |  __floordiv__(self, other)
     |  
     |  __format__(self, spec, *args, **kwargs)
     |      Default object formatter.
     |  
     |  __ge__(self, other)
     |      Return self>=value.
     |  
     |  __getattr__(self, attr)
     |  
     |  __gt__(self, other)
     |      Return self>value.
     |  
     |  __iadd__(self, other)
     |  
     |  __ifloordiv__(self, other)
     |  
     |  __imod__(self, other)
     |  
     |  __imul__(self, other)
     |  
     |  __int__(self)
     |  
     |  __ipow__(self, other)
     |  
     |  __isub__(self, other)
     |  
     |  __itruediv__(self, other)
     |  
     |  __le__(self, other)
     |      Return self<=value.
     |  
     |  __lt__(self, other)
     |      Return self<value.
     |  
     |  __mod__(self, other)
     |  
     |  __mul__(self, other)
     |  
     |  __ne__(self, other)
     |      Return self!=value.
     |  
     |  __neg__(self)
     |  
     |  __pos__(self)
     |  
     |  __pow__(self, other)
     |  
     |  __radd__(self, other)
     |  
     |  __repr__(self)
     |      Return repr(self).
     |  
     |  __rfloordiv__(self, other)
     |  
     |  __rmod__(self, other)
     |  
     |  __rmul__(self, other)
     |  
     |  __round__(self)
     |  
     |  __rsub__(self, other)
     |  
     |  __rtruediv__(self, other)
     |  
     |  __setattr__(self, attr, value)
     |      Implement setattr(self, name, value).
     |  
     |  __str__(self, *args, **kwargs)
     |      Return str(self).
     |  
     |  __sub__(self, other)
     |  
     |  __truediv__(self, other)
     |  
     |  reduce_to_base_units(self, base_units={'A': Unit(symbol='A', name='ampere', indices=None), 'K': Unit(symbol='K', name='kelvin', indices=None), 'cd': Unit(symbol='cd', name='candela', indices=None), 'kg': Unit(symbol='kg', name='kilogram', indices=(1, 4)), 'm': Unit(symbol='m', name='meter', indices=None), 'mol': Unit(symbol='mol', name='mole', indices=None), 's': Unit(symbol='s', name='second', indices=None)}, definitions={'Bq': Definition(symbol='Bq', units=Units({'s':-1}), factor=1), 'C': Definition(symbol='C', units=Units({'A':1,'s':1}), factor=1), '^{\\circ}C': Definition(symbol='^{\\circ}C', units=Units({'K':1}), factor=1), 'F': Definition(symbol='F', units=Units({'C':1,'V':-1}), factor=1), 'g': Definition(symbol='g', units=Units({'kg':1}), factor=Decimal('0.001')), 'Gy': Definition(symbol='Gy', units=Units({'J':1,'kg':-1}), factor=1), 'H': Definition(symbol='H', units=Units({'Wb':1,'A':-1}), factor=1), 'Hz': Definition(symbol='Hz', units=Units({'s':-1}), factor=1), 'J': Definition(symbol='J', units=Units({'N':1,'m':1}), factor=1), 'kat': Definition(symbol='kat', units=Units({'mol':1,'s':-1}), factor=1), 'lm': Definition(symbol='lm', units=Units({'cd':1,'sr':1}), factor=1), 'lx': Definition(symbol='lx', units=Units({'lm':1,'m':-2}), factor=1), 'N': Definition(symbol='N', units=Units({'kg':1,'m':1,'s':-2}), factor=1), '\\Omega': Definition(symbol='\\Omega', units=Units({'V':1,'A':-1}), factor=1), 'Pa': Definition(symbol='Pa', units=Units({'N':1,'m':-2}), factor=1), 'rad': Definition(symbol='rad', units=Units({}), factor=1), 'S': Definition(symbol='S', units=Units({'A':1,'V':-1}), factor=1), 'sr': Definition(symbol='sr', units=Units({}), factor=1), 'Sv': Definition(symbol='Sv', units=Units({'J':1,'kg':-1}), factor=1), 'T': Definition(symbol='T', units=Units({'Wb':1,'m':-2}), factor=1), 'V': Definition(symbol='V', units=Units({'W':1,'A':-1}), factor=1), 'Wb': Definition(symbol='Wb', units=Units({'V':1,'s':1}), factor=1), 'W': Definition(symbol='W', units=Units({'J':1,'s':-1}), factor=1)}, strict=True)
     |      Express this number in SI base units.
     |  
     |  substitute_units(self, definitions)
     |      Substitute the given units for others.
     |      
     |      See substitute_units().
     |  
     |  to_siunitx(self)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from SciNum.units.WithUnits:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from SciNum.units.WithUnits:
     |  
     |  __hash__ = None
    
    class UncertainDecimal(builtins.object)
     |  UncertainDecimal(value, plus=None, minus=None)
     |  
     |  A decimal number with arbitrary precision and uncertainty.
     |  
     |  The value is represented internally by a Decimal object.
     |  
     |  The value is considered to lie between an upper and a lower uncertainty.
     |  
     |  Methods defined here:
     |  
     |  __abs__(self)
     |  
     |  __add__(self, other)
     |  
     |  __bool__(self)
     |  
     |  __complex__(self)
     |  
     |  __eq__(self, other)
     |      Return self==value.
     |  
     |  __float__(self)
     |  
     |  __floordiv__(self, other)
     |  
     |  __format__(self, fmt, *args, **kwargs)
     |      Default object formatter.
     |  
     |  __ge__(self, other)
     |      Return self>=value.
     |  
     |  __getattr__(self, attr)
     |  
     |  __gt__(self, other)
     |      Return self>value.
     |  
     |  __iadd__(self, other)
     |  
     |  __ifloordiv__(self, other)
     |  
     |  __imod__(self, other)
     |  
     |  __imul__(self, other)
     |  
     |  __init__(self, value, plus=None, minus=None)
     |      Initialize a new value.
     |      
     |      "plus" is the upper uncertainty and "minus" is the lower uncertainty such
     |      that the following is always verified:
     |      
     |        value - abs(minus) <= value <= <= value + abs(plus)
     |  
     |  __int__(self)
     |  
     |  __ipow__(self, other)
     |  
     |  __isub__(self, other)
     |  
     |  __itruediv__(self, other)
     |  
     |  __le__(self, other)
     |      Return self<=value.
     |  
     |  __lt__(self, other)
     |      Return self<value.
     |  
     |  __mod__(self, other)
     |  
     |  __mul__(self, other)
     |  
     |  __ne__(self, other)
     |      Return self!=value.
     |  
     |  __neg__(self)
     |  
     |  __pos__(self)
     |  
     |  __pow__(self, other)
     |  
     |  __radd__(self, other)
     |  
     |  __repr__(self)
     |      Return repr(self).
     |  
     |  __rfloordiv__(self, other)
     |  
     |  __rmod__(self, other)
     |  
     |  __rmul__(self, other)
     |  
     |  __round__(self)
     |  
     |  __rsub__(self, other)
     |  
     |  __rtruediv__(self, other)
     |  
     |  __setattr__(self, attr, value)
     |      Implement setattr(self, name, value).
     |  
     |  __str__(self, *args, **kwargs)
     |      Return str(self).
     |  
     |  __sub__(self, other)
     |  
     |  __truediv__(self, other)
     |  
     |  copy(self)
     |      Return a (deep) copy.
     |  
     |  format(self, fmt='g', homogenize=True, concise=False)
     |      Convert the number and the uncertainty to an appropriate string
     |      representation.
     |      
     |      homogenize: If True, the uncertainty will be formatted to match the places
     |      shown in the number after it has been formatted.
     |  
     |  to_measured_decimal(self)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  __hash__ = None
    
    class UncertainDecimalWithUnits(SciNum.units.WithUnits)
     |  UncertainDecimalWithUnits(value, units, plus=None, minus=None)
     |  
     |  An UncertainDecimal with units.
     |  
     |  Method resolution order:
     |      UncertainDecimalWithUnits
     |      SciNum.units.WithUnits
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __init__(self, value, units, plus=None, minus=None)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |  
     |  copy(self)
     |      Return a copy.
     |  
     |  to_measured_decimal(self)
     |      Convert to MeasuredDecimalWithUnits.
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from SciNum.units.WithUnits:
     |  
     |  __abs__(self)
     |  
     |  __add__(self, other)
     |  
     |  __complex__(self)
     |  
     |  __eq__(self, other)
     |      Return self==value.
     |  
     |  __float__(self)
     |  
     |  __floordiv__(self, other)
     |  
     |  __format__(self, spec, *args, **kwargs)
     |      Default object formatter.
     |  
     |  __ge__(self, other)
     |      Return self>=value.
     |  
     |  __getattr__(self, attr)
     |  
     |  __gt__(self, other)
     |      Return self>value.
     |  
     |  __iadd__(self, other)
     |  
     |  __ifloordiv__(self, other)
     |  
     |  __imod__(self, other)
     |  
     |  __imul__(self, other)
     |  
     |  __int__(self)
     |  
     |  __ipow__(self, other)
     |  
     |  __isub__(self, other)
     |  
     |  __itruediv__(self, other)
     |  
     |  __le__(self, other)
     |      Return self<=value.
     |  
     |  __lt__(self, other)
     |      Return self<value.
     |  
     |  __mod__(self, other)
     |  
     |  __mul__(self, other)
     |  
     |  __ne__(self, other)
     |      Return self!=value.
     |  
     |  __neg__(self)
     |  
     |  __pos__(self)
     |  
     |  __pow__(self, other)
     |  
     |  __radd__(self, other)
     |  
     |  __repr__(self)
     |      Return repr(self).
     |  
     |  __rfloordiv__(self, other)
     |  
     |  __rmod__(self, other)
     |  
     |  __rmul__(self, other)
     |  
     |  __round__(self)
     |  
     |  __rsub__(self, other)
     |  
     |  __rtruediv__(self, other)
     |  
     |  __setattr__(self, attr, value)
     |      Implement setattr(self, name, value).
     |  
     |  __str__(self, *args, **kwargs)
     |      Return str(self).
     |  
     |  __sub__(self, other)
     |  
     |  __truediv__(self, other)
     |  
     |  reduce_to_base_units(self, base_units={'A': Unit(symbol='A', name='ampere', indices=None), 'K': Unit(symbol='K', name='kelvin', indices=None), 'cd': Unit(symbol='cd', name='candela', indices=None), 'kg': Unit(symbol='kg', name='kilogram', indices=(1, 4)), 'm': Unit(symbol='m', name='meter', indices=None), 'mol': Unit(symbol='mol', name='mole', indices=None), 's': Unit(symbol='s', name='second', indices=None)}, definitions={'Bq': Definition(symbol='Bq', units=Units({'s':-1}), factor=1), 'C': Definition(symbol='C', units=Units({'A':1,'s':1}), factor=1), '^{\\circ}C': Definition(symbol='^{\\circ}C', units=Units({'K':1}), factor=1), 'F': Definition(symbol='F', units=Units({'C':1,'V':-1}), factor=1), 'g': Definition(symbol='g', units=Units({'kg':1}), factor=Decimal('0.001')), 'Gy': Definition(symbol='Gy', units=Units({'J':1,'kg':-1}), factor=1), 'H': Definition(symbol='H', units=Units({'Wb':1,'A':-1}), factor=1), 'Hz': Definition(symbol='Hz', units=Units({'s':-1}), factor=1), 'J': Definition(symbol='J', units=Units({'N':1,'m':1}), factor=1), 'kat': Definition(symbol='kat', units=Units({'mol':1,'s':-1}), factor=1), 'lm': Definition(symbol='lm', units=Units({'cd':1,'sr':1}), factor=1), 'lx': Definition(symbol='lx', units=Units({'lm':1,'m':-2}), factor=1), 'N': Definition(symbol='N', units=Units({'kg':1,'m':1,'s':-2}), factor=1), '\\Omega': Definition(symbol='\\Omega', units=Units({'V':1,'A':-1}), factor=1), 'Pa': Definition(symbol='Pa', units=Units({'N':1,'m':-2}), factor=1), 'rad': Definition(symbol='rad', units=Units({}), factor=1), 'S': Definition(symbol='S', units=Units({'A':1,'V':-1}), factor=1), 'sr': Definition(symbol='sr', units=Units({}), factor=1), 'Sv': Definition(symbol='Sv', units=Units({'J':1,'kg':-1}), factor=1), 'T': Definition(symbol='T', units=Units({'Wb':1,'m':-2}), factor=1), 'V': Definition(symbol='V', units=Units({'W':1,'A':-1}), factor=1), 'Wb': Definition(symbol='Wb', units=Units({'V':1,'s':1}), factor=1), 'W': Definition(symbol='W', units=Units({'J':1,'s':-1}), factor=1)}, strict=True)
     |      Express this number in SI base units.
     |  
     |  substitute_units(self, definitions)
     |      Substitute the given units for others.
     |      
     |      See substitute_units().
     |  
     |  to_siunitx(self)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from SciNum.units.WithUnits:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from SciNum.units.WithUnits:
     |  
     |  __hash__ = None

FUNCTIONS
    get_average_measurement(values)
        Calculate the average value given several repeated measurements of the same
        quantity.
        
        The significant figures are those up to and including the first uncertain
        value.
        
        Returns a MeasuredDecimal.
    
    parse_uncertainty(x)
        Parse a string representing an uncertain number.
        
        Given the lack of a standard string representations, this parser should be
        considered experiemental and likely to change in the future.
        
        The following formats are currently recognized:
        
          1) "value ±uncertainty", e.g. "15.0 ±0.5"
          2) "value {uncertainty}", e.g. "15.0 {0.5}
          3) "value {+uncertainty|-uncertainty}", e.g. "15.0 {+0.5|-0.3}"
          4) "value(uncertainty)", e.g. "15.0(5)"
        
        Spaces are optional except for 4.
        
        1,2 & 4 specify symmetric uncertainties. initially symmetric uncertainties
        may become asymmetric after certain operations such as division.
        
        3 specifies an asymmetric uncertainty.
        
        Format 4 may be followed by a trailing exponent, e.g. 1.5456(3)e-3, which
        is the same as 1.5456e-3 ±0.0003e-3, or 1.5456e-3 ±3e-6
    
    to_measured_decimal(value)
        Convert the value to a MeasuredDecimal
    
    to_uncertain_decimal(value)
        Convert the value to an UncertainDecimal

DATA
    BasicContext = Context(prec=9, rounding=ROUND_HALF_UP, Emin=-99...onBy...
    DefaultContext = Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=...ap...
    ExtendedContext = Context(prec=9, rounding=ROUND_HALF_EVEN, Emin=-...=...
    HAVE_THREADS = True
    MAX_EMAX = 999999999999999999
    MAX_PREC = 999999999999999999
    MIN_EMIN = -999999999999999999
    MIN_ETINY = -1999999999999999997
    ROUND_05UP = 'ROUND_05UP'
    ROUND_CEILING = 'ROUND_CEILING'
    ROUND_DOWN = 'ROUND_DOWN'
    ROUND_FLOOR = 'ROUND_FLOOR'
    ROUND_HALF_DOWN = 'ROUND_HALF_DOWN'
    ROUND_HALF_EVEN = 'ROUND_HALF_EVEN'
    ROUND_HALF_UP = 'ROUND_HALF_UP'
    ROUND_UP = 'ROUND_UP'

SciNum.units

NAME
    SciNum.units

CLASSES
    builtins.dict(builtins.object)
        Units
    builtins.object
        WithUnits
    builtins.tuple(builtins.object)
        Definition
        Prefix
        Unit
    
    class Definition(builtins.tuple)
     |  Definition(symbol, units, factor)
     |  
     |  Definition(symbol, units, factor)
     |  
     |  Method resolution order:
     |      Definition
     |      builtins.tuple
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __getnewargs__(self)
     |      Return self as a plain tuple.  Used by copy and pickle.
     |  
     |  __repr__(self)
     |      Return a nicely formatted representation string
     |  
     |  _asdict(self)
     |      Return a new OrderedDict which maps field names to their values.
     |  
     |  _replace(_self, **kwds)
     |      Return a new Definition object replacing specified fields with new values
     |  
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |  
     |  _make(iterable) from builtins.type
     |      Make a new Definition object from a sequence or iterable
     |  
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |  
     |  __new__(_cls, symbol, units, factor)
     |      Create new instance of Definition(symbol, units, factor)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  symbol
     |      Alias for field number 0
     |  
     |  units
     |      Alias for field number 1
     |  
     |  factor
     |      Alias for field number 2
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  _fields = ('symbol', 'units', 'factor')
     |  
     |  _fields_defaults = {}
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.tuple:
     |  
     |  __add__(self, value, /)
     |      Return self+value.
     |  
     |  __contains__(self, key, /)
     |      Return key in self.
     |  
     |  __eq__(self, value, /)
     |      Return self==value.
     |  
     |  __ge__(self, value, /)
     |      Return self>=value.
     |  
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |  
     |  __getitem__(self, key, /)
     |      Return self[key].
     |  
     |  __gt__(self, value, /)
     |      Return self>value.
     |  
     |  __hash__(self, /)
     |      Return hash(self).
     |  
     |  __iter__(self, /)
     |      Implement iter(self).
     |  
     |  __le__(self, value, /)
     |      Return self<=value.
     |  
     |  __len__(self, /)
     |      Return len(self).
     |  
     |  __lt__(self, value, /)
     |      Return self<value.
     |  
     |  __mul__(self, value, /)
     |      Return self*value.
     |  
     |  __ne__(self, value, /)
     |      Return self!=value.
     |  
     |  __rmul__(self, value, /)
     |      Return value*self.
     |  
     |  count(self, value, /)
     |      Return number of occurrences of value.
     |  
     |  index(self, value, start=0, stop=9223372036854775807, /)
     |      Return first index of value.
     |      
     |      Raises ValueError if the value is not present.
    
    class Prefix(builtins.tuple)
     |  Prefix(symbol, name, factor)
     |  
     |  Prefix(symbol, name, factor)
     |  
     |  Method resolution order:
     |      Prefix
     |      builtins.tuple
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __getnewargs__(self)
     |      Return self as a plain tuple.  Used by copy and pickle.
     |  
     |  __repr__(self)
     |      Return a nicely formatted representation string
     |  
     |  _asdict(self)
     |      Return a new OrderedDict which maps field names to their values.
     |  
     |  _replace(_self, **kwds)
     |      Return a new Prefix object replacing specified fields with new values
     |  
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |  
     |  _make(iterable) from builtins.type
     |      Make a new Prefix object from a sequence or iterable
     |  
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |  
     |  __new__(_cls, symbol, name, factor)
     |      Create new instance of Prefix(symbol, name, factor)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  symbol
     |      Alias for field number 0
     |  
     |  name
     |      Alias for field number 1
     |  
     |  factor
     |      Alias for field number 2
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  _fields = ('symbol', 'name', 'factor')
     |  
     |  _fields_defaults = {}
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.tuple:
     |  
     |  __add__(self, value, /)
     |      Return self+value.
     |  
     |  __contains__(self, key, /)
     |      Return key in self.
     |  
     |  __eq__(self, value, /)
     |      Return self==value.
     |  
     |  __ge__(self, value, /)
     |      Return self>=value.
     |  
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |  
     |  __getitem__(self, key, /)
     |      Return self[key].
     |  
     |  __gt__(self, value, /)
     |      Return self>value.
     |  
     |  __hash__(self, /)
     |      Return hash(self).
     |  
     |  __iter__(self, /)
     |      Implement iter(self).
     |  
     |  __le__(self, value, /)
     |      Return self<=value.
     |  
     |  __len__(self, /)
     |      Return len(self).
     |  
     |  __lt__(self, value, /)
     |      Return self<value.
     |  
     |  __mul__(self, value, /)
     |      Return self*value.
     |  
     |  __ne__(self, value, /)
     |      Return self!=value.
     |  
     |  __rmul__(self, value, /)
     |      Return value*self.
     |  
     |  count(self, value, /)
     |      Return number of occurrences of value.
     |  
     |  index(self, value, start=0, stop=9223372036854775807, /)
     |      Return first index of value.
     |      
     |      Raises ValueError if the value is not present.
    
    class Unit(builtins.tuple)
     |  Unit(symbol, name, indices)
     |  
     |  Unit(symbol, name, indices)
     |  
     |  Method resolution order:
     |      Unit
     |      builtins.tuple
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __getnewargs__(self)
     |      Return self as a plain tuple.  Used by copy and pickle.
     |  
     |  __repr__(self)
     |      Return a nicely formatted representation string
     |  
     |  _asdict(self)
     |      Return a new OrderedDict which maps field names to their values.
     |  
     |  _replace(_self, **kwds)
     |      Return a new Unit object replacing specified fields with new values
     |  
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |  
     |  _make(iterable) from builtins.type
     |      Make a new Unit object from a sequence or iterable
     |  
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |  
     |  __new__(_cls, symbol, name, indices)
     |      Create new instance of Unit(symbol, name, indices)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  symbol
     |      Alias for field number 0
     |  
     |  name
     |      Alias for field number 1
     |  
     |  indices
     |      Alias for field number 2
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  _fields = ('symbol', 'name', 'indices')
     |  
     |  _fields_defaults = {}
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.tuple:
     |  
     |  __add__(self, value, /)
     |      Return self+value.
     |  
     |  __contains__(self, key, /)
     |      Return key in self.
     |  
     |  __eq__(self, value, /)
     |      Return self==value.
     |  
     |  __ge__(self, value, /)
     |      Return self>=value.
     |  
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |  
     |  __getitem__(self, key, /)
     |      Return self[key].
     |  
     |  __gt__(self, value, /)
     |      Return self>value.
     |  
     |  __hash__(self, /)
     |      Return hash(self).
     |  
     |  __iter__(self, /)
     |      Implement iter(self).
     |  
     |  __le__(self, value, /)
     |      Return self<=value.
     |  
     |  __len__(self, /)
     |      Return len(self).
     |  
     |  __lt__(self, value, /)
     |      Return self<value.
     |  
     |  __mul__(self, value, /)
     |      Return self*value.
     |  
     |  __ne__(self, value, /)
     |      Return self!=value.
     |  
     |  __rmul__(self, value, /)
     |      Return value*self.
     |  
     |  count(self, value, /)
     |      Return number of occurrences of value.
     |  
     |  index(self, value, start=0, stop=9223372036854775807, /)
     |      Return first index of value.
     |      
     |      Raises ValueError if the value is not present.
    
    class Units(builtins.dict)
     |  A dictionary subclass representing units and their powers.
     |  
     |  Method resolution order:
     |      Units
     |      builtins.dict
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __getitem__(self, key)
     |      x.__getitem__(y) <==> x[y]
     |  
     |  __imul__(self, other)
     |  
     |  __ipow__(self, other)
     |  
     |  __itruediv__(self, other)
     |  
     |  __mul__(self, other)
     |  
     |  __pow__(self, other)
     |  
     |  __repr__(self)
     |      Return repr(self).
     |  
     |  __rtruediv__(self, other)
     |  
     |  __setitem__(self, key, value)
     |      Set self[key] to value.
     |  
     |  __str__(self, braces=True)
     |      Return str(self).
     |  
     |  __truediv__(self, other)
     |  
     |  copy(self)
     |      Return a copy.
     |  
     |  from_str(self, s)
     |      Parse units from a string.
     |  
     |  to_siunitx(self, wrap=True)
     |      Return an siunitx string.
     |      
     |      http://ctan.org/pkg/siunitx
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.dict:
     |  
     |  __contains__(self, key, /)
     |      True if the dictionary has the specified key, else False.
     |  
     |  __delitem__(self, key, /)
     |      Delete self[key].
     |  
     |  __eq__(self, value, /)
     |      Return self==value.
     |  
     |  __ge__(self, value, /)
     |      Return self>=value.
     |  
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |  
     |  __gt__(self, value, /)
     |      Return self>value.
     |  
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |  
     |  __iter__(self, /)
     |      Implement iter(self).
     |  
     |  __le__(self, value, /)
     |      Return self<=value.
     |  
     |  __len__(self, /)
     |      Return len(self).
     |  
     |  __lt__(self, value, /)
     |      Return self<value.
     |  
     |  __ne__(self, value, /)
     |      Return self!=value.
     |  
     |  __sizeof__(...)
     |      D.__sizeof__() -> size of D in memory, in bytes
     |  
     |  clear(...)
     |      D.clear() -> None.  Remove all items from D.
     |  
     |  get(self, key, default=None, /)
     |      Return the value for key if key is in the dictionary, else default.
     |  
     |  items(...)
     |      D.items() -> a set-like object providing a view on D's items
     |  
     |  keys(...)
     |      D.keys() -> a set-like object providing a view on D's keys
     |  
     |  pop(...)
     |      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
     |      If key is not found, d is returned if given, otherwise KeyError is raised
     |  
     |  popitem(...)
     |      D.popitem() -> (k, v), remove and return some (key, value) pair as a
     |      2-tuple; but raise KeyError if D is empty.
     |  
     |  setdefault(self, key, default=None, /)
     |      Insert key with a value of default if key is not in the dictionary.
     |      
     |      Return the value for key if key is in the dictionary, else default.
     |  
     |  update(...)
     |      D.update([E, ]**F) -> None.  Update D from dict/iterable E and F.
     |      If E is present and has a .keys() method, then does:  for k in E: D[k] = E[k]
     |      If E is present and lacks a .keys() method, then does:  for k, v in E: D[k] = v
     |      In either case, this is followed by: for k in F:  D[k] = F[k]
     |  
     |  values(...)
     |      D.values() -> an object providing a view on D's values
     |  
     |  ----------------------------------------------------------------------
     |  Class methods inherited from builtins.dict:
     |  
     |  fromkeys(iterable, value=None, /) from builtins.type
     |      Create a new dictionary with keys from iterable and values set to value.
     |  
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.dict:
     |  
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from builtins.dict:
     |  
     |  __hash__ = None
    
    class WithUnits(builtins.object)
     |  WithUnits(value, units)
     |  
     |  A class that adds units to others.
     |  
     |  Methods defined here:
     |  
     |  __abs__(self)
     |  
     |  __add__(self, other)
     |  
     |  __complex__(self)
     |  
     |  __eq__(self, other)
     |      Return self==value.
     |  
     |  __float__(self)
     |  
     |  __floordiv__(self, other)
     |  
     |  __format__(self, spec, *args, **kwargs)
     |      Default object formatter.
     |  
     |  __ge__(self, other)
     |      Return self>=value.
     |  
     |  __getattr__(self, attr)
     |  
     |  __gt__(self, other)
     |      Return self>value.
     |  
     |  __iadd__(self, other)
     |  
     |  __ifloordiv__(self, other)
     |  
     |  __imod__(self, other)
     |  
     |  __imul__(self, other)
     |  
     |  __init__(self, value, units)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |  
     |  __int__(self)
     |  
     |  __ipow__(self, other)
     |  
     |  __isub__(self, other)
     |  
     |  __itruediv__(self, other)
     |  
     |  __le__(self, other)
     |      Return self<=value.
     |  
     |  __lt__(self, other)
     |      Return self<value.
     |  
     |  __mod__(self, other)
     |  
     |  __mul__(self, other)
     |  
     |  __ne__(self, other)
     |      Return self!=value.
     |  
     |  __neg__(self)
     |  
     |  __pos__(self)
     |  
     |  __pow__(self, other)
     |  
     |  __radd__(self, other)
     |  
     |  __repr__(self)
     |      Return repr(self).
     |  
     |  __rfloordiv__(self, other)
     |  
     |  __rmod__(self, other)
     |  
     |  __rmul__(self, other)
     |  
     |  __round__(self)
     |  
     |  __rsub__(self, other)
     |  
     |  __rtruediv__(self, other)
     |  
     |  __setattr__(self, attr, value)
     |      Implement setattr(self, name, value).
     |  
     |  __str__(self, *args, **kwargs)
     |      Return str(self).
     |  
     |  __sub__(self, other)
     |  
     |  __truediv__(self, other)
     |  
     |  copy(self)
     |      Return a (deep) copy.
     |  
     |  reduce_to_base_units(self, base_units={'A': Unit(symbol='A', name='ampere', indices=None), 'K': Unit(symbol='K', name='kelvin', indices=None), 'cd': Unit(symbol='cd', name='candela', indices=None), 'kg': Unit(symbol='kg', name='kilogram', indices=(1, 4)), 'm': Unit(symbol='m', name='meter', indices=None), 'mol': Unit(symbol='mol', name='mole', indices=None), 's': Unit(symbol='s', name='second', indices=None)}, definitions={'Bq': Definition(symbol='Bq', units=Units({'s':-1}), factor=1), 'C': Definition(symbol='C', units=Units({'A':1,'s':1}), factor=1), '^{\\circ}C': Definition(symbol='^{\\circ}C', units=Units({'K':1}), factor=1), 'F': Definition(symbol='F', units=Units({'C':1,'V':-1}), factor=1), 'g': Definition(symbol='g', units=Units({'kg':1}), factor=Decimal('0.001')), 'Gy': Definition(symbol='Gy', units=Units({'J':1,'kg':-1}), factor=1), 'H': Definition(symbol='H', units=Units({'Wb':1,'A':-1}), factor=1), 'Hz': Definition(symbol='Hz', units=Units({'s':-1}), factor=1), 'J': Definition(symbol='J', units=Units({'N':1,'m':1}), factor=1), 'kat': Definition(symbol='kat', units=Units({'mol':1,'s':-1}), factor=1), 'lm': Definition(symbol='lm', units=Units({'cd':1,'sr':1}), factor=1), 'lx': Definition(symbol='lx', units=Units({'lm':1,'m':-2}), factor=1), 'N': Definition(symbol='N', units=Units({'kg':1,'m':1,'s':-2}), factor=1), '\\Omega': Definition(symbol='\\Omega', units=Units({'V':1,'A':-1}), factor=1), 'Pa': Definition(symbol='Pa', units=Units({'N':1,'m':-2}), factor=1), 'rad': Definition(symbol='rad', units=Units({}), factor=1), 'S': Definition(symbol='S', units=Units({'A':1,'V':-1}), factor=1), 'sr': Definition(symbol='sr', units=Units({}), factor=1), 'Sv': Definition(symbol='Sv', units=Units({'J':1,'kg':-1}), factor=1), 'T': Definition(symbol='T', units=Units({'Wb':1,'m':-2}), factor=1), 'V': Definition(symbol='V', units=Units({'W':1,'A':-1}), factor=1), 'Wb': Definition(symbol='Wb', units=Units({'V':1,'s':1}), factor=1), 'W': Definition(symbol='W', units=Units({'J':1,'s':-1}), factor=1)}, strict=True)
     |      Express this number in SI base units.
     |  
     |  substitute_units(self, definitions)
     |      Substitute the given units for others.
     |      
     |      See substitute_units().
     |  
     |  to_siunitx(self)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  __hash__ = None

FUNCTIONS
    express(definition, unit)
        Given a Definition, define a unit in terms of the other units in the
        definition.
    
    get_prefix(unit, units={'A': Unit(symbol='A', name='ampere', indices=None), 'K': Unit(symbol='K', name='kelvin', indices=None), 'cd': Unit(symbol='cd', name='candela', indices=None), 'kg': Unit(symbol='kg', name='kilogram', indices=(1, 4)), 'm': Unit(symbol='m', name='meter', indices=None), 'mol': Unit(symbol='mol', name='mole', indices=None), 's': Unit(symbol='s', name='second', indices=None), 'Bq': Unit(symbol='Bq', name='becquerel', indices=None), '^{\\circ}C': Unit(symbol='^{\\circ}C', name='degree Celsius', indices=None), 'C': Unit(symbol='C', name='coulomb', indices=None), 'F': Unit(symbol='F', name='farad', indices=None), 'Gy': Unit(symbol='Gy', name='gray', indices=None), 'H': Unit(symbol='H', name='henry', indices=None), 'Hz': Unit(symbol='Hz', name='hertz', indices=None), 'J': Unit(symbol='J', name='joule', indices=None), 'kat': Unit(symbol='kat', name='katal', indices=None), 'lm': Unit(symbol='lm', name='lumen', indices=None), 'lx': Unit(symbol='lx', name='lux', indices=None), 'N': Unit(symbol='N', name='newton', indices=None), '\\Omega': Unit(symbol='\\Omega', name='ohm', indices=None), 'Pa': Unit(symbol='Pa', name='pascal', indices=None), 'rad': Unit(symbol='rad', name='radian', indices=None), 'sr': Unit(symbol='sr', name='steradian', indices=None), 'S': Unit(symbol='S', name='simens', indices=None), 'Sv': Unit(symbol='Sv', name='sievert', indices=None), 'T': Unit(symbol='T', name='tesla', indices=None), 'V': Unit(symbol='V', name='volt', indices=None), 'Wb': Unit(symbol='Wb', name='weber', indices=None), 'W': Unit(symbol='W', name='watt', indices=None)}, prefixes={'Y': Prefix(symbol='Y', name='yotta', factor=Decimal('1000000000000000000000000')), 'Z': Prefix(symbol='Z', name='zetta', factor=Decimal('1000000000000000000000')), 'E': Prefix(symbol='E', name='exa', factor=Decimal('1000000000000000000')), 'P': Prefix(symbol='P', name='peta', factor=Decimal('1000000000000000')), 'T': Prefix(symbol='T', name='tera', factor=Decimal('1000000000000')), 'G': Prefix(symbol='G', name='giga', factor=Decimal('1000000000')), 'M': Prefix(symbol='M', name='mega', factor=Decimal('1000000')), 'k': Prefix(symbol='k', name='kilo', factor=Decimal('1000')), 'h': Prefix(symbol='h', name='hecto', factor=Decimal('100')), 'da': Prefix(symbol='da', name='deka', factor=Decimal('10')), 'd': Prefix(symbol='d', name='deci', factor=Decimal('0.1000000000000000055511151231257827021181583404541015625')), 'c': Prefix(symbol='c', name='centi', factor=Decimal('0.01000000000000000020816681711721685132943093776702880859375')), 'm': Prefix(symbol='m', name='milli', factor=Decimal('0.001000000000000000020816681711721685132943093776702880859375')), 'µ': Prefix(symbol='µ', name='micro', factor=Decimal('9.99999999999999954748111825886258685613938723690807819366455078125E-7')), 'n': Prefix(symbol='n', name='nano', factor=Decimal('1.0000000000000000622815914577798564188970686927859787829220294952392578125E-9')), 'p': Prefix(symbol='p', name='pico', factor=Decimal('9.9999999999999997988664762925561536725284350612952266601496376097202301025390625E-13')), 'f': Prefix(symbol='f', name='femto', factor=Decimal('1.00000000000000007770539987666107923830718560119501514549256171449087560176849365234375E-15')), 'a': Prefix(symbol='a', name='atto', factor=Decimal('1.00000000000000007154242405462192450852805618492324772617063644020163337700068950653076171875E-18')), 'z': Prefix(symbol='z', name='zepto', factor=Decimal('9.9999999999999990753745222789637139672993451167553075691041795935998237609965144656598567962646484375E-22')), 'y': Prefix(symbol='y', name='yocto', factor=Decimal('9.99999999999999923700499551702824631300061898481408826917069364976185796844987407894222997128963470458984375E-25'))})
        Return a prefix, the base unit, and the fixed prefix of the "base" unit, e.g.
        'mg' would return ('m', 'g', 'k') because the "base" unit is 'kg'.
    
    reduce_to_base_units(units, base_units={'A': Unit(symbol='A', name='ampere', indices=None), 'K': Unit(symbol='K', name='kelvin', indices=None), 'cd': Unit(symbol='cd', name='candela', indices=None), 'kg': Unit(symbol='kg', name='kilogram', indices=(1, 4)), 'm': Unit(symbol='m', name='meter', indices=None), 'mol': Unit(symbol='mol', name='mole', indices=None), 's': Unit(symbol='s', name='second', indices=None)}, definitions={'Bq': Definition(symbol='Bq', units=Units({'s':-1}), factor=1), 'C': Definition(symbol='C', units=Units({'A':1,'s':1}), factor=1), '^{\\circ}C': Definition(symbol='^{\\circ}C', units=Units({'K':1}), factor=1), 'F': Definition(symbol='F', units=Units({'C':1,'V':-1}), factor=1), 'g': Definition(symbol='g', units=Units({'kg':1}), factor=Decimal('0.001')), 'Gy': Definition(symbol='Gy', units=Units({'J':1,'kg':-1}), factor=1), 'H': Definition(symbol='H', units=Units({'Wb':1,'A':-1}), factor=1), 'Hz': Definition(symbol='Hz', units=Units({'s':-1}), factor=1), 'J': Definition(symbol='J', units=Units({'N':1,'m':1}), factor=1), 'kat': Definition(symbol='kat', units=Units({'mol':1,'s':-1}), factor=1), 'lm': Definition(symbol='lm', units=Units({'cd':1,'sr':1}), factor=1), 'lx': Definition(symbol='lx', units=Units({'lm':1,'m':-2}), factor=1), 'N': Definition(symbol='N', units=Units({'kg':1,'m':1,'s':-2}), factor=1), '\\Omega': Definition(symbol='\\Omega', units=Units({'V':1,'A':-1}), factor=1), 'Pa': Definition(symbol='Pa', units=Units({'N':1,'m':-2}), factor=1), 'rad': Definition(symbol='rad', units=Units({}), factor=1), 'S': Definition(symbol='S', units=Units({'A':1,'V':-1}), factor=1), 'sr': Definition(symbol='sr', units=Units({}), factor=1), 'Sv': Definition(symbol='Sv', units=Units({'J':1,'kg':-1}), factor=1), 'T': Definition(symbol='T', units=Units({'Wb':1,'m':-2}), factor=1), 'V': Definition(symbol='V', units=Units({'W':1,'A':-1}), factor=1), 'Wb': Definition(symbol='Wb', units=Units({'V':1,'s':1}), factor=1), 'W': Definition(symbol='W', units=Units({'J':1,'s':-1}), factor=1)}, prefixes={'Y': Prefix(symbol='Y', name='yotta', factor=Decimal('1000000000000000000000000')), 'Z': Prefix(symbol='Z', name='zetta', factor=Decimal('1000000000000000000000')), 'E': Prefix(symbol='E', name='exa', factor=Decimal('1000000000000000000')), 'P': Prefix(symbol='P', name='peta', factor=Decimal('1000000000000000')), 'T': Prefix(symbol='T', name='tera', factor=Decimal('1000000000000')), 'G': Prefix(symbol='G', name='giga', factor=Decimal('1000000000')), 'M': Prefix(symbol='M', name='mega', factor=Decimal('1000000')), 'k': Prefix(symbol='k', name='kilo', factor=Decimal('1000')), 'h': Prefix(symbol='h', name='hecto', factor=Decimal('100')), 'da': Prefix(symbol='da', name='deka', factor=Decimal('10')), 'd': Prefix(symbol='d', name='deci', factor=Decimal('0.1000000000000000055511151231257827021181583404541015625')), 'c': Prefix(symbol='c', name='centi', factor=Decimal('0.01000000000000000020816681711721685132943093776702880859375')), 'm': Prefix(symbol='m', name='milli', factor=Decimal('0.001000000000000000020816681711721685132943093776702880859375')), 'µ': Prefix(symbol='µ', name='micro', factor=Decimal('9.99999999999999954748111825886258685613938723690807819366455078125E-7')), 'n': Prefix(symbol='n', name='nano', factor=Decimal('1.0000000000000000622815914577798564188970686927859787829220294952392578125E-9')), 'p': Prefix(symbol='p', name='pico', factor=Decimal('9.9999999999999997988664762925561536725284350612952266601496376097202301025390625E-13')), 'f': Prefix(symbol='f', name='femto', factor=Decimal('1.00000000000000007770539987666107923830718560119501514549256171449087560176849365234375E-15')), 'a': Prefix(symbol='a', name='atto', factor=Decimal('1.00000000000000007154242405462192450852805618492324772617063644020163337700068950653076171875E-18')), 'z': Prefix(symbol='z', name='zepto', factor=Decimal('9.9999999999999990753745222789637139672993451167553075691041795935998237609965144656598567962646484375E-22')), 'y': Prefix(symbol='y', name='yocto', factor=Decimal('9.99999999999999923700499551702824631300061898481408826917069364976185796844987407894222997128963470458984375E-25'))}, strict=True)
        Reduce units to a set of unprefixed base units.
        
        Return the reduced units along with the power of 10 by which to multiply
        the value.
        
        The function does not currently check for cyclical definitions, so be careful.
    
    remove_prefix(unit, units={'A': Unit(symbol='A', name='ampere', indices=None), 'K': Unit(symbol='K', name='kelvin', indices=None), 'cd': Unit(symbol='cd', name='candela', indices=None), 'kg': Unit(symbol='kg', name='kilogram', indices=(1, 4)), 'm': Unit(symbol='m', name='meter', indices=None), 'mol': Unit(symbol='mol', name='mole', indices=None), 's': Unit(symbol='s', name='second', indices=None), 'Bq': Unit(symbol='Bq', name='becquerel', indices=None), '^{\\circ}C': Unit(symbol='^{\\circ}C', name='degree Celsius', indices=None), 'C': Unit(symbol='C', name='coulomb', indices=None), 'F': Unit(symbol='F', name='farad', indices=None), 'Gy': Unit(symbol='Gy', name='gray', indices=None), 'H': Unit(symbol='H', name='henry', indices=None), 'Hz': Unit(symbol='Hz', name='hertz', indices=None), 'J': Unit(symbol='J', name='joule', indices=None), 'kat': Unit(symbol='kat', name='katal', indices=None), 'lm': Unit(symbol='lm', name='lumen', indices=None), 'lx': Unit(symbol='lx', name='lux', indices=None), 'N': Unit(symbol='N', name='newton', indices=None), '\\Omega': Unit(symbol='\\Omega', name='ohm', indices=None), 'Pa': Unit(symbol='Pa', name='pascal', indices=None), 'rad': Unit(symbol='rad', name='radian', indices=None), 'sr': Unit(symbol='sr', name='steradian', indices=None), 'S': Unit(symbol='S', name='simens', indices=None), 'Sv': Unit(symbol='Sv', name='sievert', indices=None), 'T': Unit(symbol='T', name='tesla', indices=None), 'V': Unit(symbol='V', name='volt', indices=None), 'Wb': Unit(symbol='Wb', name='weber', indices=None), 'W': Unit(symbol='W', name='watt', indices=None)}, prefixes={'Y': Prefix(symbol='Y', name='yotta', factor=Decimal('1000000000000000000000000')), 'Z': Prefix(symbol='Z', name='zetta', factor=Decimal('1000000000000000000000')), 'E': Prefix(symbol='E', name='exa', factor=Decimal('1000000000000000000')), 'P': Prefix(symbol='P', name='peta', factor=Decimal('1000000000000000')), 'T': Prefix(symbol='T', name='tera', factor=Decimal('1000000000000')), 'G': Prefix(symbol='G', name='giga', factor=Decimal('1000000000')), 'M': Prefix(symbol='M', name='mega', factor=Decimal('1000000')), 'k': Prefix(symbol='k', name='kilo', factor=Decimal('1000')), 'h': Prefix(symbol='h', name='hecto', factor=Decimal('100')), 'da': Prefix(symbol='da', name='deka', factor=Decimal('10')), 'd': Prefix(symbol='d', name='deci', factor=Decimal('0.1000000000000000055511151231257827021181583404541015625')), 'c': Prefix(symbol='c', name='centi', factor=Decimal('0.01000000000000000020816681711721685132943093776702880859375')), 'm': Prefix(symbol='m', name='milli', factor=Decimal('0.001000000000000000020816681711721685132943093776702880859375')), 'µ': Prefix(symbol='µ', name='micro', factor=Decimal('9.99999999999999954748111825886258685613938723690807819366455078125E-7')), 'n': Prefix(symbol='n', name='nano', factor=Decimal('1.0000000000000000622815914577798564188970686927859787829220294952392578125E-9')), 'p': Prefix(symbol='p', name='pico', factor=Decimal('9.9999999999999997988664762925561536725284350612952266601496376097202301025390625E-13')), 'f': Prefix(symbol='f', name='femto', factor=Decimal('1.00000000000000007770539987666107923830718560119501514549256171449087560176849365234375E-15')), 'a': Prefix(symbol='a', name='atto', factor=Decimal('1.00000000000000007154242405462192450852805618492324772617063644020163337700068950653076171875E-18')), 'z': Prefix(symbol='z', name='zepto', factor=Decimal('9.9999999999999990753745222789637139672993451167553075691041795935998237609965144656598567962646484375E-22')), 'y': Prefix(symbol='y', name='yocto', factor=Decimal('9.99999999999999923700499551702824631300061898481408826917069364976185796844987407894222997128963470458984375E-25'))})
        Remove any prefix from a unit and return the base unit and the factor.
    
    replace_names_with_symbols(name, units={'A': Unit(symbol='A', name='ampere', indices=None), 'K': Unit(symbol='K', name='kelvin', indices=None), 'cd': Unit(symbol='cd', name='candela', indices=None), 'kg': Unit(symbol='kg', name='kilogram', indices=(1, 4)), 'm': Unit(symbol='m', name='meter', indices=None), 'mol': Unit(symbol='mol', name='mole', indices=None), 's': Unit(symbol='s', name='second', indices=None), 'Bq': Unit(symbol='Bq', name='becquerel', indices=None), '^{\\circ}C': Unit(symbol='^{\\circ}C', name='degree Celsius', indices=None), 'C': Unit(symbol='C', name='coulomb', indices=None), 'F': Unit(symbol='F', name='farad', indices=None), 'Gy': Unit(symbol='Gy', name='gray', indices=None), 'H': Unit(symbol='H', name='henry', indices=None), 'Hz': Unit(symbol='Hz', name='hertz', indices=None), 'J': Unit(symbol='J', name='joule', indices=None), 'kat': Unit(symbol='kat', name='katal', indices=None), 'lm': Unit(symbol='lm', name='lumen', indices=None), 'lx': Unit(symbol='lx', name='lux', indices=None), 'N': Unit(symbol='N', name='newton', indices=None), '\\Omega': Unit(symbol='\\Omega', name='ohm', indices=None), 'Pa': Unit(symbol='Pa', name='pascal', indices=None), 'rad': Unit(symbol='rad', name='radian', indices=None), 'sr': Unit(symbol='sr', name='steradian', indices=None), 'S': Unit(symbol='S', name='simens', indices=None), 'Sv': Unit(symbol='Sv', name='sievert', indices=None), 'T': Unit(symbol='T', name='tesla', indices=None), 'V': Unit(symbol='V', name='volt', indices=None), 'Wb': Unit(symbol='Wb', name='weber', indices=None), 'W': Unit(symbol='W', name='watt', indices=None)}, prefixes={'Y': Prefix(symbol='Y', name='yotta', factor=Decimal('1000000000000000000000000')), 'Z': Prefix(symbol='Z', name='zetta', factor=Decimal('1000000000000000000000')), 'E': Prefix(symbol='E', name='exa', factor=Decimal('1000000000000000000')), 'P': Prefix(symbol='P', name='peta', factor=Decimal('1000000000000000')), 'T': Prefix(symbol='T', name='tera', factor=Decimal('1000000000000')), 'G': Prefix(symbol='G', name='giga', factor=Decimal('1000000000')), 'M': Prefix(symbol='M', name='mega', factor=Decimal('1000000')), 'k': Prefix(symbol='k', name='kilo', factor=Decimal('1000')), 'h': Prefix(symbol='h', name='hecto', factor=Decimal('100')), 'da': Prefix(symbol='da', name='deka', factor=Decimal('10')), 'd': Prefix(symbol='d', name='deci', factor=Decimal('0.1000000000000000055511151231257827021181583404541015625')), 'c': Prefix(symbol='c', name='centi', factor=Decimal('0.01000000000000000020816681711721685132943093776702880859375')), 'm': Prefix(symbol='m', name='milli', factor=Decimal('0.001000000000000000020816681711721685132943093776702880859375')), 'µ': Prefix(symbol='µ', name='micro', factor=Decimal('9.99999999999999954748111825886258685613938723690807819366455078125E-7')), 'n': Prefix(symbol='n', name='nano', factor=Decimal('1.0000000000000000622815914577798564188970686927859787829220294952392578125E-9')), 'p': Prefix(symbol='p', name='pico', factor=Decimal('9.9999999999999997988664762925561536725284350612952266601496376097202301025390625E-13')), 'f': Prefix(symbol='f', name='femto', factor=Decimal('1.00000000000000007770539987666107923830718560119501514549256171449087560176849365234375E-15')), 'a': Prefix(symbol='a', name='atto', factor=Decimal('1.00000000000000007154242405462192450852805618492324772617063644020163337700068950653076171875E-18')), 'z': Prefix(symbol='z', name='zepto', factor=Decimal('9.9999999999999990753745222789637139672993451167553075691041795935998237609965144656598567962646484375E-22')), 'y': Prefix(symbol='y', name='yocto', factor=Decimal('9.99999999999999923700499551702824631300061898481408826917069364976185796844987407894222997128963470458984375E-25'))})
        Replace names such as "volt" with matching symbols.
        
        Prefixes are also replaced, e.g. millivolt -> mV.
    
    substitute_units(units, definitions)
        Substitute units with equivalent definitions.
        
        definitions: A list of "Definition"s to use to replace units in the list.
        
        This function is very useful in conjunction with reduce_to_base_units()
        for expressing quantities in an arbitrary system of units such as cgs. Simply
        reduce the units to the SI base units, then use this function to substitute
        definitions of the SI base units in the target system.

DATA
    SI_BASE_UNITS = {'A': Unit(symbol='A', name='ampere', indices=None), '...
    SI_BINARY_PREFIXES = {'Ei': Prefix(symbol='Ei', name='exbi', factor=De...
    SI_DERIVED_UNITS = {'Bq': Unit(symbol='Bq', name='becquerel', indices=...
    SI_DERIVED_UNIT_DEFINITIONS = {'Bq': Definition(symbol='Bq', units=Uni...
    SI_PREFIXES = {'E': Prefix(symbol='E', name='exa', factor=Decimal('100...
    SI_UNITS = {'A': Unit(symbol='A', name='ampere', indices=None), 'Bq': ...
Contact
echo xyne.archlinux.ca | sed 's/\./@/'
Feeds
Blog News
Validation
XHTML 1.0 Strict CSS level 3 Atom 1.0