chainerx.linalg.solve

chainerx.linalg.solve(a, b)

Solves a linear matrix equation, or system of linear scalar equations.

It computes the exact solution of x in ax = b, where a is a square and full rank matrix, b can be a vector, or a rectangular matrix. When b is matrix, its columns are treated as separate vectors representing multiple right-hand sides.

Parameters
  • a (ndarray) – Coefficient matrix.

  • b (ndarray) – “dependent variable” values.

Returns

Solution to the system ax = b. Shape is identical to b.

Return type

ndarray

Note

The dtype must be float32 or float64 (float16 is not supported yet.)