示例#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)))