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))
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))
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))