Example #1
0
 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])
Example #2
0
 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])
Example #3
0
 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])
Example #4
0
 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])
Example #5
0
 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))
Example #6
0
 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))
Example #7
0
 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))
Example #8
0
 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))