mdpy.unit.Quantity#

class mdpy.unit.Quantity(value, unit: ~mdpy.unit.unit.Unit = <Unit object: 1.00e+00 >)[source]#
__init__(value, unit: ~mdpy.unit.unit.Unit = <Unit object: 1.00e+00 >) None[source]#
Parameters:
  • value (int, float, array, Quantity) – the value of quantity

  • unit (Unit) – the unit of quantity

Methods

__init__(value[, unit])

param value:

the value of quantity

convert_to(target_unit)

convert_to converts self to the unit of target_unit

is_dimension_less()

is_dimension_less judges wether self is dimensionless

sqrt()

sqrt returns square root of Quantity

sum(*keys)

Attributes

unit

value