MCPcopy Create free account
hub / github.com/Cantera/cantera / test_convert_to_array

Method test_convert_to_array

test/python/test_utils.py:88–91  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

86 assert system.convert_to(500, "kg") == 0.5
87
88 def test_convert_to_array(self):
89 system = ct.UnitSystem({"length": "km"})
90 x = np.array(((3, 4), (0.5, 2.0), (1.0, 0.0)))
91 assert system.convert_to(x, "m") == approx(1000 * x)
92
93 def test_convert_activation_energy_to_array(self):
94 system = ct.UnitSystem({"activation-energy": "J/mol"})

Callers

nothing calls this directly

Calls 1

UnitSystemMethod · 0.45

Tested by

no test coverage detected