cupyx.scipy.sparse.linalg.lsqr¶
-
cupyx.scipy.sparse.linalg.
lsqr
(A, b)¶ Solves linear system with QR decomposition.
Find the solution to a large, sparse, linear system of equations. The function solves
Ax = b
. Given two-dimensional matrixA
is decomposed intoQ * R
.Parameters: - A (cupy.ndarray or cupyx.scipy.sparse.csr_matrix) – The input matrix
with dimension
(N, N)
- b (cupy.ndarray) – Right-hand side vector.
Returns: Its length must be ten. It has same type elements as SciPy. Only the first element, the solution vector
x
, is available and other elements are expressed asNone
because the implementation of cuSOLVER is different from the one of SciPy. You can easily calculate the fourth element bynorm(b - Ax)
and the ninth element bynorm(x)
.Return type: See also
- A (cupy.ndarray or cupyx.scipy.sparse.csr_matrix) – The input matrix
with dimension