Skip to content

Tessero\Linalg\Linalg

← All classes

AI assistant

Build this with Claude Code, Cursor or Copilot

Copy a Tessero-tuned prompt for Tessero\Linalg\Linalg, grounded in 16 real API signatures , into your IDE's AI. No chatbot, just exact context.

solve static
solve(mixed $a, mixed $b): Tessero\NDArray

Solve A x = b (stacked). b may be (M,) or (M, K).

inv static
inv(mixed $a): Tessero\NDArray

Inverse (stacked).

det static
det(mixed $a): Tessero\NDArray|float

Determinant (stacked).

slogdet static
slogdet(mixed $a): array

Sign and natural log of |det| (stacked), robust against overflow.

cholesky static
cholesky(mixed $a, bool $upper = false): Tessero\NDArray

Lower-triangular Cholesky factor L with A = L L^T (stacked).

qr static
qr(mixed $a, string $mode = 'reduced'): Tessero\NDArray|array

QR factorisation. mode 'reduced' (Q: M x K, R: K x N, K = min(M, N)), 'complete' (Q: M x M, R: M x N) or 'r' (R only).

eigh static
eigh(mixed $a, bool $vectors = true): array

Eigen-decomposition of a symmetric matrix (lower triangle is read), eigenvalues ascending (stacked).

eigvalsh static
eigvalsh(mixed $a): Tessero\NDArray
eig static
eig(mixed $a): array

General eigen-decomposition. Eigenvalues/vectors are float64 when all eigenvalues are real, complex128 otherwise (as NumPy does).

eigvals static
eigvals(mixed $a): Tessero\NDArray
svd static
svd(mixed $a, bool $fullMatrices = true, bool $computeUv = true): Tessero\NDArray|array

Singular value decomposition A = U diag(s) Vt.

pinv static
pinv(mixed $a, float $rcond = 1.0E-15): Tessero\NDArray

Moore-Penrose pseudo-inverse via SVD; singular values below rcond * max(s) are treated as zero.

lstsq static
lstsq(mixed $a, mixed $b, ?float $rcond = null): array

Least squares (numpy.linalg.lstsq via LAPACK gelsd).

solveTriangular static
solveTriangular(mixed $a, mixed $b, bool $lower = false, bool $transpose = false, bool $unitDiagonal = false): Tessero\NDArray

Solve a triangular system (scipy.linalg.solve_triangular).

lu static
lu(mixed $a): array

LU factorisation with partial pivoting, A = P L U (scipy.linalg.lu).

norm static
norm(mixed $x, string|int|float|null $ord = null, ?int $axis = null): Tessero\NDArray|float

Vector or matrix norm (numpy.linalg.norm for ord null, 'fro', 'nuc', 1, 2, inf, -inf and vector p-norms).

cond static
cond(mixed $a): float
matrixRank static
matrixRank(mixed $a, ?float $tol = null): int
trace static
trace(mixed $a): float
tril static
tril(Tessero\NDArray $a, int $k = 0): Tessero\NDArray

Lower triangle (numpy.tril).

triu static
triu(Tessero\NDArray $a, int $k = 0): Tessero\NDArray

Upper triangle (numpy.triu).