cupy.linalg.solve

cupy.linalg.solve(a, b)[source]

Solves a linear matrix equation.

It computes the exact solution of x in ax = b, where a is a square and full rank matrix.

Parameters:
  • a (cupy.ndarray) – The matrix with dimension (..., M, M).
  • b (cupy.ndarray) – The matrix with dimension (...,M) or (..., M, K).
Returns:

The matrix with dimension (..., M) or (..., M, K).

Return type:

cupy.ndarray