示例#1
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")
示例#2
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)
示例#3
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')
示例#4
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")
示例#5
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')