コード例 #1
0
ファイル: test_misc.py プロジェクト: stonexjr/scikits.cuda
 def test_diff_complex128(self):
     x = np.array([1.3 + 2.0j, 2.7 - 3.9j, 4.9 + 1.0j, 5.1 - 9.0j],
                  np.complex128)
     x_gpu = gpuarray.to_gpu(x)
     y_gpu = misc.diff(x_gpu)
     assert np.allclose(y_gpu.get(), np.diff(x))
コード例 #2
0
ファイル: test_misc.py プロジェクト: trumb/scikits.cuda
 def test_diff_complex128(self):
     x = np.array([1.3+2.0j, 2.7-3.9j, 4.9+1.0j, 5.1-9.0j], np.complex128)
     x_gpu = gpuarray.to_gpu(x)
     y_gpu = misc.diff(x_gpu)
     assert np.allclose(y_gpu.get(), np.diff(x))
コード例 #3
0
ファイル: test_misc.py プロジェクト: stonexjr/scikits.cuda
 def test_diff_float64(self):
     x = np.array([1.3, 2.7, 4.9, 5.1], np.float64)
     x_gpu = gpuarray.to_gpu(x)
     y_gpu = misc.diff(x_gpu)
     assert np.allclose(y_gpu.get(), np.diff(x))
コード例 #4
0
ファイル: test_misc.py プロジェクト: trumb/scikits.cuda
 def test_diff_float64(self):
     x = np.array([1.3, 2.7, 4.9, 5.1], np.float64)
     x_gpu = gpuarray.to_gpu(x)
     y_gpu = misc.diff(x_gpu)
     assert np.allclose(y_gpu.get(), np.diff(x))