def test_cumsum_complex64(self): x = np.array([1, 4j, 3, 2j, 8], np.complex64) x_gpu = gpuarray.to_gpu(x) c_gpu = misc.cumsum(x_gpu) assert_allclose(c_gpu.get(), np.cumsum(x), rtol=dtype_to_rtol[np.complex64], atol=dtype_to_atol[np.complex64])
def test_cumsum_float32(self): x = np.array([1, 4, 3, 2, 8], np.float32) x_gpu = gpuarray.to_gpu(x) c_gpu = misc.cumsum(x_gpu) assert_allclose(c_gpu.get(), np.cumsum(x), rtol=dtype_to_rtol[np.float32], atol=dtype_to_atol[np.float32])
def test_cumsum_complex128(self): x = np.array([1, 4j, 3, 2j, 8], np.complex128) x_gpu = gpuarray.to_gpu(x) c_gpu = misc.cumsum(x_gpu) assert_allclose(c_gpu.get(), np.cumsum(x), rtol=dtype_to_rtol[np.complex128], atol=dtype_to_atol[np.complex128])
def test_cumsum_float64(self): x = np.array([1, 4, 3, 2, 8], np.float64) x_gpu = gpuarray.to_gpu(x) c_gpu = misc.cumsum(x_gpu) assert_allclose(c_gpu.get(), np.cumsum(x), rtol=dtype_to_rtol[np.float64], atol=dtype_to_atol[np.float64])
def test_cumsum_complex128(self): x = np.array([1, 4j, 3, 2j, 8], np.complex128) x_gpu = gpuarray.to_gpu(x) c_gpu = misc.cumsum(x_gpu) assert np.allclose(c_gpu.get(), np.cumsum(x))
def test_cumsum_float64(self): x = np.array([1, 4, 3, 2, 8], np.float64) x_gpu = gpuarray.to_gpu(x) c_gpu = misc.cumsum(x_gpu) assert np.allclose(c_gpu.get(), np.cumsum(x))