For the bedroom example someone posted, here's the equivalent in pint:
import pint
# Possibly my least favorite thing about Pint is
# the verbose importing/instantiating dance
u = pint.UnitRegistry()
q = u.quantity()
# there are multiple ways of making <Quantity> objects:
volume = q('10 feet') * q(10, 'feet') * (10 * u.feet)
volume.to('gallons)
# How deep could you fill the room?
(q('2 tons') / (q('10 feet') * q('12 feet') * u.water/u.gravity)).to('feet')
Notes:- Pint has far fewer material property entries in its database (though one can make arbitrary unit registries --- I'm wondering about an importer for the Frink ones... but https://frinklang.org/frinkdata/units.txt doesn't seem to have a license?)
- That said, I'm not wild about Frink's treatment of material properties: Why is the constant `butter` a density, but `eggwhite` a mass, and `naturalgas` a specific energy?
- Pint works (mostly) nicely with numpy and can (sometimes) drop into existing code, since <Quantity> objects quack like builtin numbers.