Units and Uncertainties: Pint and uncertainties
Carry physical units and measurement uncertainty through calculations.
Easy
import pint
u = pint.UnitRegistry()
(5 * u.volt / (220 * u.ohm)).to("mA") # 22.7 mA
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.