Alternative packages
Alternative packages to handle physical units in python¶
List of solutions¶
There are plenty of python packages that handle physical quantities computation. Some of them are full packages while some are just plain python module. Here is a list of those I could find (approximately sorted by guessed-popularity) :
- astropy
- sympy
- pint
- forallpeople
- unyt
- python-measurement
- Unum
- scipp
- magnitude
- physics.py : there are actually several packages based on the same core code : ipython-physics (python 2 only) and python3-physics (python 3 only)
- ScientificPython.Scientific.Physics.PhysicalQuantities
- numericalunits
- dimensions.py (python 2 only)
- buckingham
- units
- quantities
- physical-quantities
- brian
- quantiphy
- parampy
- pynbody
- python-units
- natu
- misu
- units
- openscn
- and finally pysics from which this package was inspired
If you know another package that is not in this list yet, feel free to contribute ! Also, if you are interested in the subject of physical quantities packages in python, check this quantities-comparison repo and this talk. Also check this comparison table and this talk.
Some C/C++ alternatives :
- units
How physipy stands out¶
A quick performance benchmark show that physipy is just as fast (or faster) than other well-known physical packages, both when computing scalars (int or float) and numpy arrays :

For a more in-depth comparison, checkout (not maintenained, but it should!) : https://github.com/mocquin/quantities-comparison.
