def test_dotSum(self): A = VectorMatrix(Shape(10,10,10)) B = VectorMatrix(Shape(10,10,10)) for idx in range(A.size()): A.set(idx, (0.1*idx, 0.2*idx, -0.3*idx)) B.set(idx, (-0.4*idx, 0.5*idx, -0.6*idx)) self.assertTrue(abs(A.dotSum(B) - 79880040.0) < 0.1)