def test_solve(self): A = self.q b = [[3], [7]] * self.ureg.s x = np.linalg.solve(A, b) helpers.assert_quantity_almost_equal(x, self.Q_([[1], [1]], "s / m")) helpers.assert_quantity_almost_equal(np.dot(A, x), b)
def test_dot_numpy_func(self): self.assertQuantityEqual( np.dot(self.q.ravel(), [0, 0, 1, 0] * self.ureg.dimensionless), 3 * self.ureg.m, )
def test_dot_numpy_func(self): helpers.assert_quantity_equal( np.dot(self.q.ravel(), [0, 0, 1, 0] * self.ureg.dimensionless), 3 * self.ureg.m, )