Exemplo n.º 1
0
 def testgemm_scale_with_out(self):
     for A, B in self.test_matrices:
         result_ref = np.dot(A, B) * 2.
         result = np.empty(result_ref.shape, dtype=A.dtype)
         mathutil.gemm(2., A, B, out=result)
         self.assertTrue(result.flags['C_CONTIGUOUS'])
         np.testing.assert_array_almost_equal(result, result_ref)
 def testgemm_scale_with_out(self):
     for A, B in self.test_matrices:
         result_ref = np.dot(A,B) * 2.
         result = np.empty(result_ref.shape, dtype = A.dtype)
         mathutil.gemm(2., A, B, out=result)
         self.assertTrue(result.flags['C_CONTIGUOUS'])
         np.testing.assert_array_almost_equal(result, result_ref)
Exemplo n.º 3
0
 def testgemm_scale(self):
     for A, B in self.test_matrices:
         result = mathutil.gemm(2., A, B)
         result_ref = np.dot(A,B) * 2.
         self.assertTrue(result.flags['C_CONTIGUOUS'])
         np.testing.assert_array_almost_equal(result, result_ref)
Exemplo n.º 4
0
 def testgemm_scale(self):
     for A, B in self.test_matrices:
         result = mathutil.gemm(2., A, B)
         result_ref = np.dot(A, B) * 2.
         self.assertTrue(result.flags['C_CONTIGUOUS'])
         np.testing.assert_array_almost_equal(result, result_ref)