コード例 #1
0
 def test_pcic(self):
     with units.context("hydro"):
         fu = units.parse_units("kilogram / d / meter ** 2")
         tu = units.parse_units("mm/day")
         np.isclose(1 * fu, 1 * tu)
コード例 #2
0
 def test_dimensionality(self):
     with units.context("hydro"):
         fu = 1 * units.parse_units("kg / m**2 / s")
         tu = 1 * units.parse_units("mm / d")
         fu.to("mmday")
         tu.to("mmday")
コード例 #3
0
 def test_hydro(self):
     with units.context("hydro"):
         q = 1 * units.kg / units.m ** 2 / units.s
         assert q.to("mm/day") == q.to("mm/d")