예제 #1
0
 def test_trapz2d_complex128(self):
     x = np.asarray(np.random.rand(5, 5)+1j*np.random.rand(5, 5), np.complex128)
     x_gpu = gpuarray.to_gpu(x)
     z = integrate.trapz2d(x_gpu)
     assert np.allclose(np.trapz(np.trapz(x)), z)
예제 #2
0
 def test_trapz2d_float64(self):
     x = np.asarray(np.random.rand(5, 5), np.float64)
     x_gpu = gpuarray.to_gpu(x)
     z = integrate.trapz2d(x_gpu)
     assert np.allclose(np.trapz(np.trapz(x)), z)