skcuda.special.sici¶
-
skcuda.special.
sici
(x_gpu)[source]¶ Sine/Cosine integral.
Computes the sine and cosine integral of every element in the input matrix.
Parameters: x_gpu (GPUArray) – Input matrix of shape (m, n). Returns: (si_gpu, ci_gpu) – Tuple of GPUarrays containing the sine integrals and cosine integrals of the entries of x_gpu. Return type: tuple of GPUArrays Examples
>>> import pycuda.gpuarray as gpuarray >>> import pycuda.autoinit >>> import numpy as np >>> import scipy.special >>> import special >>> x = np.array([[1, 2], [3, 4]], np.float32) >>> x_gpu = gpuarray.to_gpu(x) >>> (si_gpu, ci_gpu) = sici(x_gpu) >>> (si, ci) = scipy.special.sici(x) >>> np.allclose(si, si_gpu.get()) True >>> np.allclose(ci, ci_gpu.get()) True