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 np.allclose(m_gpu.get(), np.max(np.abs(x)))
Exemplo n.º 2
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.º 3
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.º 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 np.allclose(m_gpu.get(), np.max(np.abs(x)))