Exemplo n.º 1
0
 def test_max_with_initial_arg(self):
     self.assertQuantityEqual(
         np.max(self.q[..., None], axis=2, initial=3 * self.ureg.m),
         [[3, 3], [3, 4]] * self.ureg.m,
     )
Exemplo n.º 2
0
 def test_max_with_axis_arg(self):
     self.assertQuantityEqual(np.max(self.q, axis=1), [2, 4] * self.ureg.m)
Exemplo n.º 3
0
 def test_max_with_axis_arg(self):
     helpers.assert_quantity_equal(np.max(self.q, axis=1), [2, 4] * self.ureg.m)
Exemplo n.º 4
0
 def test_max_numpy_func(self):
     self.assertEqual(np.max(self.q), 4 * self.ureg.m)
Exemplo n.º 5
0
 def test_max_numpy_func(self):
     assert np.max(self.q) == 4 * self.ureg.m