buffalo_panel.solvers.solve_dense

buffalo_panel.solvers.solve_dense(matrix, rhs)[source]

Solve a dense linear system with NumPy.

Parameters:
  • matrix (FloatArray) – Dense coefficient matrix with shape (n, n).

  • rhs (FloatArray) – Right-hand-side vector or matrix with shape (n,) or (n, m).

Returns:

Solution vector or matrix with the same trailing shape as rhs.

Return type:

FloatArray

Raises:
  • numpy.linalg.LinAlgError – Raised by NumPy when matrix is singular or otherwise cannot be solved as a square dense system.

  • ValueError – Raised by NumPy when matrix and rhs have incompatible shapes.