Link | Sito web | PyPI DLs/month | GitHub Stars | Used by | Built-in units | Built-in constants | Arbitrary prefixes | np scalar array | np object array | Decimal | Fraction | Uncertainties | string | absolute °C | dB | Sintassi | Commenti |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
scipy.constants | scipy.org/... | 167,385 | 7,087 | 181,360 | Sì 50 | Sì 400 in CODATA | No | - no unit objects | - no unit objects | - no unit objects | - no unit objects | - no unit objects | - no unit objects | No | No | constants.c == 299792458.0 | Just tables of numerical constants; unit-aware calculations not supported. scipy.constants.physical_constants specifies units as strings and uncertainties. Could be used to supply other packages with coefficients. |
sympy.physics.units | sympy.org/... | 55,424 | 6,924 | 18,324 | Sì 200? | Sì | - u.mega*u.meter but not u.megameter | No | Sì array([1, 2, 3])*u.m | - converts to sympy | - converts to sympy | cm = u.m/100 | |||||
astropy.units | astropy.org/... | 11,358 | 2,435 | 13,777 | Sì | Sì | No | Sì | - | Sì | Sì | 15.1 * u.meter / (32.0 * u.second) | |||||
Pint | github.com/... | 35,746 | 1,128 | 1,579 | Sì | Sì | Sì Mm, GV, etc. | Sì array([1,2,3])*ureg.m or ureg.m*array([1,2,3]) | No ValueError | Sì | Sì | Sì built-in | Sì | Sì | No | V = 1*ureg.dm**3 | |
unyt | readthedocs.io/... | 243 | 29 | Sì 101 | Sì 33 | Sì km | 4*m + 3*cm - 5*ft + 6*yard | ||||||||||
Quantities | readthedocs.org | 3,917 | 147 | 231 | Sì array([1,2,3]) * pq.J | No | |||||||||||
Units | bitbucket.org/... | 1,376 | |||||||||||||||
numericalunits | python.org/... | 445 | 69 | Overflow issues, random set of units = not deterministic, need to do calculations twice to confirm they are being done correctly | |||||||||||||
SciMath Units | readthedocs.org/... | 430 | 36 | Sì built-in | |||||||||||||
Buckingham | github.com/... | 361 | 20 | 0 | Sì 53 | No | Sì | V = Number(1,dims='decimeter^3') | Single file | ||||||||
Unum | bitbucket.org/... | 334 | |||||||||||||||
natu | github.io/... | 315 | Sì | Sì 40 | Sì | Sì m*array([1, 2, 3]) | Sì array([1, 2, 3])*m | No | No | Sì | No | Sì | Sì | V = 1*dm**3 | weird format for dB, Hz != 1/s, "pre-release state" | ||
misu | github.com/... | 308 | 11 | 0 | |||||||||||||
Magnitude | juanreyero.com/... | 238 | 16 | 31 | Sì | Sì | Sì | ||||||||||
udunitspy | github.com/... | 188 | 2 | 0 | Python wrapper for UDUNITS2 | ||||||||||||
scinumtools.units | github.com/... | 471 | 5 | Sì | Sì | Sì | Sì | Sì | Sì | Sì | Sì | Sì | Sì K, Cel, degF, degR | Sì dB, Np, dBm, dBmW, ... (both B and dB) | quant(3, 'J').to('kg*m2/s2') quant([5.9e-4, 5.2e+5], 'J*s-1').to('W') 33*unit('kg'), const('c') 3*unit.m/unit.s | No registries needed like for Pint. Documentation is available here: github.io/... | |
DimPy | cam.ac.uk/... | 0 | |||||||||||||||
Scalar | russp.us/... | 0 | |||||||||||||||
ScientificPython PhysicalQuantities | cnrs-orleans.fr/... | 0 |