Module Expr Str ImportFrom alias alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore ListLoad Str Str FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert Call NameLoad NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Assert Call NameLoad NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad decorator_list NameLoad decorator_list Assign NameStore NameStore Call NameLoad Num Num Assign NameStore NameStore Call NameLoad Num Num Assign NameStore Call NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore BinOpPow NameLoad Num Assign NameStore NameStore NameStore Num Assign NameStore NameStore NameStore BinOpDiv NameLoad Num Assign NameStore NameStore NameStore Num Assign NameStore NameStore NameStore BinOpDiv BinOpMult Num NameLoad Num Assign NameStore NameStore NameStore NameStore Call NameLoad Str Str Assign NameStore NameStore NameStore NameStore Call NameLoad Str Str Assign NameStore NameStore NameStore NameStore Call NameLoad Str Str Assign NameStore NameStore NameStore NameStore Call NameLoad Str Str Assign NameStore NameStore NameStore NameStore Call NameLoad Str Str Assign NameStore NameStore NameStore NameStore Call NameLoad Str Str Assign NameStore NameStore NameStore NameStore Call NameLoad Str Str Assign NameStore BinOpPow NameLoad Num Assign NameStore NameStore NameStore NameStore BinOpDiv Num NameLoad Assign NameStore NameStore NameStore NameStore BinOpDiv BinOpMult NameLoad NameLoad BinOpPow NameLoad Num Assign NameStore NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore NameStore BinOpDiv NameLoad NameLoad Assign NameStore NameStore NameStore NameStore NameStore BinOpDiv NameLoad BinOpPow NameLoad Num Assign NameStore NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore NameStore NameStore BinOpDiv NameLoad NameLoad Assign NameStore NameStore NameStore BinOpDiv NameLoad NameLoad Assign NameStore NameStore NameStore NameStore NameStore BinOpDiv NameLoad NameLoad Assign NameStore NameStore NameStore NameStore BinOpDiv NameLoad NameLoad Assign NameStore NameStore NameStore NameStore NameStore BinOpDiv NameLoad NameLoad Assign NameStore NameStore NameStore NameStore BinOpDiv BinOpMult NameLoad NameLoad BinOpPow NameLoad Num Assign NameStore NameStore NameStore NameStore BinOpDiv BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore BinOpDiv NameLoad BinOpPow NameLoad Num Assign NameStore BinOpDiv NameLoad BinOpPow NameLoad Num Assign NameStore NameStore NameStore BinOpDiv Num NameLoad Assign NameStore NameStore NameStore BinOpDiv BinOpMult NameLoad NameLoad BinOpPow NameLoad Num Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore NameStore BinOpMult Num NameLoad Assign NameStore NameStore NameStore BinOpMult Num NameLoad Assign NameStore NameStore NameStore BinOpMult Num NameLoad Assign NameStore NameStore NameStore BinOpDiv BinOpPow NameLoad Num Num Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore BinOpMult Num NameLoad Assign NameStore NameStore NameStore BinOpMult Num NameLoad Assign NameStore NameStore BinOpMult Num NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Str NameLoad Assign NameStore NameStore NameLoad Assign NameStore NameStore NameStore BinOpDiv NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore BinOpDiv BinOpMult Num NameLoad NameLoad Assign NameStore NameStore BinOpDiv BinOpDiv BinOpMult BinOpMult Call NameLoad Str BinOpPow NameLoad Num BinOpPow NameLoad Num NameLoad BinOpPow NameLoad Num Assign NameStore NameStore BinOpDiv BinOpMult BinOpMult BinOpMult Num NameLoad BinOpPow NameLoad Num NameLoad BinOpPow NameLoad Num Assign NameStore NameStore BinOpDiv Num BinOpMult NameLoad BinOpPow NameLoad Num Assign NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult BinOpMult BinOpMult Call NameLoad Str BinOpPow NameLoad Num NameLoad NameLoad Assign NameStore BinOpDiv NameLoad BinOpMult Num NameLoad Assign NameStore BinOpMult Call NameLoad Str BinOpPow Num Num Assign NameStore NameStore BinOpDiv NameLoad NameLoad Assign NameStore BinOpDiv BinOpMult BinOpMult Call NameLoad Str BinOpPow NameLoad Num NameLoad NameLoad Assign NameStore BinOpMult BinOpMult Call NameLoad Str BinOpPow NameLoad Num NameLoad Assign NameStore NameStore BinOpDiv BinOpMult Call NameLoad Str NameLoad BinOpPow NameLoad Num Assign NameStore NameStore NameStore BinOpMult Num NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore BinOpMult Num NameLoad Assign NameStore NameStore BinOpMult BinOpMult Num NameLoad NameLoad Assign NameStore BinOpDiv NameLoad BinOpPow NameLoad Num Assign NameStore Num Assign NameStore BinOpMult BinOpMult NameLoad Num NameLoad Assign NameStore NameStore BinOpDiv BinOpDiv NameLoad NameLoad NameLoad Assign NameStore NameStore BinOpDiv NameLoad NameLoad Assign NameStore NameStore BinOpMult Call NameLoad Num Num BinOpPow NameLoad Num Assign NameStore BinOpMult BinOpMult Call NameLoad Str BinOpPow NameLoad Num NameLoad Assign NameStore NameStore NameStore BinOpMult NameLoad NameLoad Assign NameStore NameStore NameStore BinOpMult Num NameLoad FunctionDef arguments args NameParam defaults body Expr Str Import alias identifier Assign NameStore ListLoad If Call NameLoad NameLoad NameLoad body Assign NameStore ListComp NameLoad comprehension NameStore Call NameLoad NameLoad CompareIn NameLoad NameLoad orelse Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num For NameStore Call NameLoad NameLoad body TryExcept body If CompareEq NameLoad SubscriptLoad Call AttributeLoad Call NameLoad BinOpAdd Str NameLoad attr Index Num body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass Return Call NameLoad NameLoad keyword NameLoad decorator_list Delete NameDel NameDel
N/A N/A 
Physical units and dimensions.

The base class is Unit, where all here defined units (~200) inherit from.

The find_unit function can help you find units for a given quantity:

    >>> import sympy.physics.units as u
    >>> u.find_unit('coul')
    ['coulomb', 'coulombs']
    >>> u.find_unit(u.charge)
    ['C', 'charge', 'coulomb', 'coulombs']
    >>> u.coulomb
    A*s

Units are always given in terms of base units that have a name and
an abbreviation:

    >>> u.A.name
    'ampere'
    >>> u.ampere.abbrev
    'A'

The generic name for a unit (like 'length', 'mass', etc...)
can help you find units:

    >>> u.find_unit('magnet')
    ['magnetic_flux', 'magnetic_constant', 'magnetic_flux_density']
    >>> u.find_unit(u.magnetic_flux)
    ['Wb', 'wb', 'weber', 'webers', 'magnetic_flux']

If, for a given session, you wish to add a unit you may do so:

    >>> u.find_unit('gal')
    []
    >>> u.gal = 4*u.quart
    >>> u.gal/u.inch**3
    231

To see a given quantity in terms of some other unit, divide by the desired
unit:

    >>> mph = u.miles/u.hours
    >>> (u.m/u.s/mph).n(2)
    2.2

The units are defined in terms of base units, so when you divide similar
units you will obtain a pure number. This means, for example, that if you
divide a real-world mass (like grams) by the atomic mass unit (amu) you
will obtain Avogadro's number. To obtain the answer in moles you
should divide by the unit ``avogadro``:

    >>> u.grams/u.amu
    602214085700000000000000
    >>> _/u.avogadro
    mol

For chemical calculations the unit ``mmu`` (molar mass unit) has been
defined so this conversion is handled automatically. For example, the
number of moles in 1 kg of water might be calculated as:

    >>> u.kg/(18*u.mmu).n(3)
    55.5*mol

If you need the number of atoms in a mol as a pure number you can use
``avogadro_number`` but if you need it as a dimensional quantity you should use
``avogadro_constant``. (``avogadro`` is a shorthand for the dimensional
quantity.)

    >>> u.avogadro_number
    602214085700000000000000
    >>> u.avogadro_constant
    602214085700000000000000/mol

Values of constants are recommended by Committee on Data for Science and
Technology (CODATA) as of 2014. See more at http://arxiv.org/pdf/1507.07956.pdf
 __future__ print_function division sympy Rational pi sympy.core AtomicExpr Unit N/A AtomicExpr N/A N/A 
    Base class for base unit of physical units.

    >>> from sympy.physics.units import Unit
    >>> Unit("meter", "m")
    m

    Other units are derived from base units:

    >>> import sympy.physics.units as u
    >>> cm = u.m/100
    >>> 100*u.cm
    m

     N/A is_positive True N/A is_commutative True N/A __slots__ N/A name abbrev __new__ N/A N/A cls name abbrev N/A assumptions N/A N/A obj N/A N/A AtomicExpr __new__ cls assumptions N/A N/A isinstance name str N/A repr N/A type name N/A N/A isinstance abbrev str N/A repr N/A type abbrev N/A N/A obj name name N/A N/A obj abbrev abbrev N/A obj N/A __getnewargs__ N/A N/A self N/A N/A N/A N/A N/A self name N/A self abbrev N/A __eq__ N/A N/A self other N/A N/A N/A N/A N/A isinstance other Unit N/A N/A self name N/A other name N/A __hash__ N/A N/A self N/A N/A N/A N/A N/A N/A super Unit self __hash__ N/A _hashable_content N/A N/A self N/A N/A N/A N/A N/A self name N/A self abbrev N/A free_symbols N/A N/A self N/A N/A N/A N/A set N/A property N/A N/A percent percents N/A Rational 1 100 N/A permille permille N/A Rational 1 1000 N/A ten N/A Rational 10 N/A yotta N/A ten 24 N/A zetta N/A ten 21 N/A exa N/A ten 18 N/A peta N/A ten 15 N/A tera N/A ten 12 N/A giga N/A ten 9 N/A mega N/A ten 6 N/A kilo N/A ten 3 N/A deca N/A ten 1 N/A deci N/A ten -1 N/A centi N/A ten -2 N/A milli N/A ten -3 N/A micro N/A ten -6 N/A nano N/A ten -9 N/A pico N/A ten -12 N/A femto N/A ten -15 N/A atto N/A ten -18 N/A zepto N/A ten -21 N/A yocto N/A ten -24 N/A rad radian radians 1 N/A deg degree degrees N/A pi 180 N/A sr steradian steradians 1 N/A mil angular_mil angular_mils N/A N/A 2 pi 6400 N/A length m meter meters N/A Unit meter m N/A mass kg kilogram kilograms N/A Unit kilogram kg N/A time s second seconds N/A Unit second s N/A current A ampere amperes N/A Unit ampere A N/A temperature K kelvin kelvins N/A Unit kelvin K N/A amount mol mole moles N/A Unit mole mol N/A luminosity cd candela candelas N/A Unit candela cd N/A volume N/A meter 3 N/A frequency Hz hz hertz N/A 1 s N/A force N newton newtons N/A N/A m kg N/A s 2 N/A energy J joule joules N/A N m N/A power W watt watts N/A J s N/A pressure Pa pa pascal pascals N/A N N/A m 2 N/A charge C coulomb coulombs N/A s A N/A voltage v V volt volts N/A W A N/A resistance ohm ohms N/A V A N/A conductance S siemens mho mhos N/A A V N/A capacitance F farad farads N/A C V N/A magnetic_flux Wb wb weber webers N/A J A N/A magnetic_flux_density T tesla teslas N/A N/A V s N/A m 2 N/A inductance H henry henrys N/A N/A V s A N/A speed N/A m s N/A acceleration N/A m N/A s 2 N/A density N/A kg N/A m 3 N/A optical_power dioptre D N/A 1 m N/A illuminance lux lx N/A N/A sr cd N/A m 2 N/A km kilometer kilometers N/A kilo m N/A dm decimeter decimeters N/A deci m N/A cm centimeter centimeters N/A centi m N/A mm millimeter millimeters N/A milli m N/A um micrometer micrometers micron microns N/A micro m N/A nm nanometer nanometers N/A nano m N/A pm picometer picometers N/A pico m N/A ft foot feet N/A N/A Rational 0.3048 m N/A inch inches N/A N/A Rational 25.4 mm N/A yd yard yards N/A 3 ft N/A mi mile miles N/A 5280 ft N/A nmi nautical_mile nautical_miles N/A 6076 ft N/A l liter liters N/A N/A m 3 1000 N/A dl deciliter deciliters N/A deci l N/A cl centiliter centiliters N/A centi l N/A ml milliliter milliliters N/A milli l N/A ms millisecond milliseconds N/A milli s N/A us microsecond microseconds N/A micro s N/A ns nanosecond nanoseconds N/A nano s N/A ps picosecond picoseconds N/A pico s N/A minute minutes N/A 60 s N/A h hour hours N/A 60 minute N/A day days N/A 24 hour N/A anomalistic_year anomalistic_years N/A N/A Rational 365.259636 day N/A sidereal_year sidereal_years N/A N/A Rational 31558149.540 s N/A tropical_year tropical_years N/A N/A Rational 365.24219 day N/A common_year common_years N/A N/A Rational 365 day N/A julian_year julian_years N/A N/A Rational 365.25 day N/A draconic_year draconic_years N/A N/A Rational 346.62 day N/A gaussian_year gaussian_years N/A N/A Rational 365.2568983 day N/A full_moon_cycle full_moon_cycles N/A N/A Rational 411.78443029 day N/A year years tropical_year N/A g gram grams N/A kilogram kilo N/A mg milligram milligrams N/A milli g N/A ug microgram micrograms N/A micro g N/A c speed_of_light N/A N/A 299792458 m s N/A G gravitational_constant N/A N/A N/A N/A N/A Rational 6.67408 N/A ten -11 N/A m 3 kg N/A s 2 N/A u0 magnetic_constant N/A N/A N/A N/A 4 pi N/A ten -7 N N/A A 2 N/A e0 electric_constant N/A 1 N/A u0 N/A c 2 N/A Z0 vacuum_impedance N/A u0 c N/A planck N/A N/A N/A N/A Rational 6.62607004 N/A ten -34 J s N/A hbar N/A planck N/A 2 pi N/A avogadro_number N/A N/A Rational 6.022140857 N/A 10 23 N/A avogadro avogadro_constant N/A avogadro_number mol N/A boltzmann N/A N/A N/A N/A Rational 1.38064852 N/A ten -23 J K N/A atomic_mass_constant N/A N/A N/A Rational 1.660539040 N/A ten -27 kg N/A gee gees N/A N/A N/A Rational 9.80665 m N/A s 2 N/A atmosphere atmospheres atm N/A 101325 pascal N/A kPa N/A kilo Pa N/A bar bars N/A 100 kPa N/A pound pounds N/A N/A 0.45359237 kg gee N/A psi N/A pound N/A inch 2 N/A dHg0 13.5951 N/A mmHg N/A N/A dHg0 9.80665 Pa N/A amu amus N/A N/A gram avogadro mol N/A mmu mmus N/A gram mol N/A quart quarts N/A N/A Rational 231 4 N/A inch 3 N/A eV N/A N/A N/A Rational 1.6021766208 N/A ten -19 J N/A ly lightyear lightyears N/A c julian_year N/A au astronomical_unit astronomical_units N/A 149597870691 m find_unit N/A N/A quantity N/A N/A N/A 
    Return a list of matching units names.
    if quantity is a string -- units containing the string `quantity`
    if quantity is a unit -- units having matching base units

    Examples
    ========

    >>> from sympy.physics import units as u
    >>> u.find_unit('charge')
    ['charge']
    >>> u.find_unit(u.charge)
    ['C', 'charge', 'coulomb', 'coulombs']
    >>> u.find_unit('volt')
    ['volt', 'volts', 'voltage']
    >>> u.find_unit(u.inch**3)[:5]
    ['l', 'cl', 'dl', 'ml', 'liter']
     N/A sympy.physics.units u N/A rv N/A N/A N/A isinstance quantity str N/A N/A rv N/A i N/A i N/A dir u N/A quantity i N/A N/A units N/A N/A N/A quantity as_coeff_Mul N/A 1 N/A i N/A dir u N/A N/A N/A N/A N/A units N/A N/A N/A N/A eval N/A u. i as_coeff_Mul N/A 1 N/A N/A N/A N/A rv append N/A str i N/A N/A N/A Exception N/A N/A N/A N/A sorted rv key len N/A N/A Rational pi