Skip to content
forked from xnx/pyqn

A Python package for handling physical quantities with names, values, uncertainties and units.

Notifications You must be signed in to change notification settings

mayya-bondarevskaya/pyqn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyvalem

A Python package for handling physical units and quantities.

A very quick overview:

In [1]: from pyqn.units import Units

In [2]: u1 = Units('km')

In [3]: u2 = Units('hr')

In [4]: u3 = u1/u2

In [5]: print(u3)
km.hr-1

In [6]: u4 = Units('m/s')

In [7]: u3.conversion(u4)        # OK: can convert from km/hr to m/s
Out[7]: 0.2777777777777778

In [8]: u3.conversion(u2)        #  Oops: can't convert from km/hr to m!
...
UnitsError: Failure in units conversion: units km.hr-1[L.T-1] and hr[T] have
different dimensions

For more information and examples, see http://christianhill.co.uk/projects/pyqn

About

A Python package for handling physical quantities with names, values, uncertainties and units.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%