Comparar tamaños
English Français

Python units/quantities packages

There are far too many different packages for unit conversion / quantities calculations in Python. Developers should cooperate on one package instead of fragmenting development across many different ones. This documents which features are supported by each package.
Sitio webPyPI DLs/monthGitHub StarsUsed byBuilt-in unitsBuilt-in constantsArbitrary prefixesnp scalar arraynp object arrayDecimalFractionUncertaintiesstringabsolute °CdBSintaxisComentarios,3857,087181,360 50 400 in CODATANo- no unit objects- no unit objects- no unit objects- no unit objects- no unit objects- no unit objectsNoNoconstants.c == 299792458.0Just 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.,4246,92418,324 200?- u.mega*u.meter but not u.megameterNo array([1, 2, 3])*u.m- converts to sympy- converts to sympycm = u.m/100,3582,43513,777No-15.1 * u.meter / (32.0 * u.second),7461,1281,579 Mm, GV, etc. array([1,2,3])*ureg.m or ureg.m*array([1,2,3])No ValueError built-inNoV = 1***3 101 33 km4*m + 3*cm - 5*ft + 6*yard
Quantitiesreadthedocs.org3,917147231 array([1,2,3]) * pq.JNo,376 issues, random set of units = not deterministic, need to do calculations twice to confirm they are being done correctly
SciMath built-in 53NoV = Number(1,dims='decimeter^3')Single file 40 m*array([1, 2, 3]) array([1, 2, 3])*mNoNoNoV = 1*dm**3weird format for dB, Hz != 1/s, "pre-release state" wrapper for UDUNITS2
this is an excerpt
2022-11-10 15:25:54
2016-03-06 19:38:38
View changes
Manage backups

User reviews and comments

No comments yet. Be the first to leave your review.