Esempio n. 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])
Esempio n. 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])
Esempio n. 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])
Esempio n. 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])
Esempio n. 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))
Esempio n. 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))
Esempio n. 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))
Esempio n. 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))