Exemplo n.º 1
0
 def test_maxabs_complex128(self):
     x = np.array([-1j, 2, -3j], np.complex128)
     x_gpu = gpuarray.to_gpu(x)
     m_gpu = misc.maxabs(x_gpu)
     assert_allclose(m_gpu.get(), np.max(np.abs(x)),
                     rtol=dtype_to_rtol[np.complex128],
                     atol=dtype_to_atol[np.complex128])
Exemplo n.º 2
0
 def test_maxabs_float64(self):
     x = np.array([-1, 2, -3], np.float64)
     x_gpu = gpuarray.to_gpu(x)
     m_gpu = misc.maxabs(x_gpu)
     assert_allclose(m_gpu.get(), np.max(np.abs(x)),
                     rtol=dtype_to_rtol[np.float64],
                     atol=dtype_to_atol[np.float64])
Exemplo n.º 3
0
 def test_maxabs_complex128(self):
     x = np.array([-1j, 2, -3j], np.complex128)
     x_gpu = gpuarray.to_gpu(x)
     m_gpu = misc.maxabs(x_gpu)
     assert_allclose(m_gpu.get(),
                     np.max(np.abs(x)),
                     rtol=dtype_to_rtol[np.complex128],
                     atol=dtype_to_atol[np.complex128])
Exemplo n.º 4
0
 def test_maxabs_float64(self):
     x = np.array([-1, 2, -3], np.float64)
     x_gpu = gpuarray.to_gpu(x)
     m_gpu = misc.maxabs(x_gpu)
     assert_allclose(m_gpu.get(),
                     np.max(np.abs(x)),
                     rtol=dtype_to_rtol[np.float64],
                     atol=dtype_to_atol[np.float64])
Exemplo n.º 5
0
 def test_maxabs_complex128(self):
     x = np.array([-1j, 2, -3j], np.complex128)
     x_gpu = gpuarray.to_gpu(x)
     m_gpu = misc.maxabs(x_gpu)
     assert np.allclose(m_gpu.get(), np.max(np.abs(x)))
Exemplo n.º 6
0
 def test_maxabs_float64(self):
     x = np.array([-1, 2, -3], np.float64)
     x_gpu = gpuarray.to_gpu(x)
     m_gpu = misc.maxabs(x_gpu)
     assert np.allclose(m_gpu.get(), np.max(np.abs(x)))
Exemplo n.º 7
0
 def test_maxabs_complex128(self):
     x = np.array([-1j, 2, -3j], np.complex128)
     x_gpu = gpuarray.to_gpu(x)
     m_gpu = misc.maxabs(x_gpu)
     assert np.allclose(m_gpu.get(), np.max(np.abs(x)))
Exemplo n.º 8
0
 def test_maxabs_float64(self):
     x = np.array([-1, 2, -3], np.float64)
     x_gpu = gpuarray.to_gpu(x)
     m_gpu = misc.maxabs(x_gpu)
     assert np.allclose(m_gpu.get(), np.max(np.abs(x)))