4.3.2. linsolve

This module defines the interface for solving linear systems of equations.

Problems to be solved are of the form:

\[A x = b,\]

where \(A\) is a square matrix and \(b\) is a vector.

4.3.2.1. Module Contents

class linsolve.Linsolve(impl: str)

Interface for solving linear systems of equations.

This class serves as a gateway to the implementations of the linear algebraic solvers.

Parameters:

impl (str) – Name of the desired implementation.

solve(A: numpy.ndarray, b: numpy.ndarray) numpy.ndarray

Solve the linear system of equations \(A x = b\).

Parameters:
  • A (np.ndarray of shape (n, n)) – Coefficient matrix.

  • b (np.ndarray of shape (n,)) – Right-hand side vector.

Returns:

Result of the linear system solution after the invocation of the solve method.

Return type:

np.ndarray