コード例 #1
0
 def testdot_with_out(self):
     for A, B in self.test_matrices:
         result_ref = np.dot(A, B)
         # c order
         result = np.empty(result_ref.shape, dtype=A.dtype)
         blasdot.dot(A, B, out=result)
         self.assertTrue(result.flags.c_contiguous)
         np.testing.assert_array_almost_equal(result, result_ref)
         # f order
         result = np.empty(result_ref.shape, dtype=A.dtype, order="f")
         blasdot.dot(A, B, out=result)
         self.assertTrue(result.flags.f_contiguous)
         np.testing.assert_array_almost_equal(result, result_ref)
コード例 #2
0
 def testdot_with_out(self):
     for A, B in self.test_matrices:
         result_ref = np.dot(A,B)
         # c order
         result = np.empty(result_ref.shape, dtype = A.dtype)
         blasdot.dot(A, B, out = result)
         self.assertTrue(result.flags.c_contiguous)
         np.testing.assert_array_almost_equal(result, result_ref)
         # f order
         result = np.empty(result_ref.shape, dtype = A.dtype, order='f')
         blasdot.dot(A, B, out = result)
         self.assertTrue(result.flags.f_contiguous)
         np.testing.assert_array_almost_equal(result, result_ref)
コード例 #3
0
 def testdot(self):
     for A, B in self.test_matrices:
         result = blasdot.dot(A, B)
         result_ref = np.dot(A, B)
         self.assertTrue(result.flags.c_contiguous)
         np.testing.assert_array_almost_equal(result, result_ref)
コード例 #4
0
 def testdot(self):
     for A, B in self.test_matrices:
         result = blasdot.dot(A, B)
         result_ref = np.dot(A,B)
         self.assertTrue(result.flags.c_contiguous)
         np.testing.assert_array_almost_equal(result, result_ref)