def test_hypot(self): assert np.hypot(3.0 * self.ureg.m, 4.0 * self.ureg.m) == 5.0 * self.ureg.m assert np.hypot(3.0 * self.ureg.m, 400.0 * self.ureg.cm) == 5.0 * self.ureg.m with pytest.raises(DimensionalityError): np.hypot(1.0 * self.ureg.m, 2.0 * self.ureg.J)
def test_hypot(self): self.assertTrue( np.hypot(3. * self.ureg.m, 4. * self.ureg.m) == 5. * self.ureg.m) self.assertTrue( np.hypot(3. * self.ureg.m, 400. * self.ureg.cm) == 5. * self.ureg.m) self.assertRaises(ValueError, np.hypot, 1. * self.ureg.m, 2. * self.ureg.J)
def test_hypot(self): self.assertTrue( np.hypot(3.0 * self.ureg.m, 4.0 * self.ureg.m) == 5.0 * self.ureg.m) self.assertTrue( np.hypot(3.0 * self.ureg.m, 400.0 * self.ureg.cm) == 5.0 * self.ureg.m) with self.assertRaises(DimensionalityError): np.hypot(1.0 * self.ureg.m, 2.0 * self.ureg.J)
def test_hypot(self): self.assertTrue(np.hypot(3. * self.ureg.m, 4. * self.ureg.m) == 5. * self.ureg.m) self.assertTrue(np.hypot(3. * self.ureg.m, 400. * self.ureg.cm) == 5. * self.ureg.m) self.assertRaises(ValueError, np.hypot, 1. * self.ureg.m, 2. * self.ureg.J)