예제 #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])
예제 #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])
예제 #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])
예제 #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])
예제 #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)))
예제 #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)))
예제 #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)))
예제 #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)))