Class LinAlgError
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
NumPy-compatible numpy.linalg.LinAlgError.
Raised by np.linalg when a matrix is unsuitable for the requested
factorisation — the wrong rank, not square, singular, or not positive definite.
public class LinAlgError : ValueError, ISerializable, INumSharpException
- Inheritance
-
LinAlgError
- Implements
- Inherited Members
Remarks
Mirrors numpy.linalg.LinAlgError, which derives from Python's ValueError
— so this derives from ValueError and a catch (ValueError) sees it,
exactly as except ValueError does upstream.
The messages NumPy 2.4.2 raises verbatim (probed):
{n}-dimensional array given. Array must be at least two-dimensional{n}-dimensional array given. Array must be two-dimensionalLast 2 dimensions of the array must be squareSingular matrixMatrix is not positive definiteArray must not contain infs or NaNs
Constructors
LinAlgError()
public LinAlgError()
LinAlgError(string)
public LinAlgError(string message)
Parameters
messagestring
LinAlgError(string, Exception)
public LinAlgError(string message, Exception innerException)