Operates on DenseMatrix (and SparseMatrix where applicable). Heavy operations are eligible for WASM/GPU acceleration via the matrix package.
L·Lᵀ + x·xᵀ / L·Lᵀ − x·xᵀ; downdate throws RangeError if the result is not positive definiteL·Lᵀ + x·xᵀ / L·Lᵀ − x·xᵀ; downdate throws RangeError if the result is not positive definite[a₀, …, aₙ] (highest degree first, numpy np.companion convention); its eigenvalues are the polynomial's roots‖A‖₁·‖A⁻¹‖₁ without forming A⁻¹ (a close lower bound; exact cond uses a full SVD); square input, only p = 1 is implementedcos(A) via funm, valid for any real spectrum (unlike matrixSqrtm/matrixLogm, which require positive/real spectra)csChol, csLu, csSpsolve, csSqr, csCounts, csSymperm, csAmd.csChol, csLu, csSpsolve, csSqr, csCounts, csSymperm, csAmd.csChol, csLu, csSpsolve, csSqr, csCounts, csSymperm, csAmd.csChol, csLu, csSpsolve, csSqr, csCounts, csSymperm, csAmd.csChol, csLu, csSpsolve, csSqr, csCounts, csSymperm, csAmd.csChol, csLu, csSpsolve, csSqr, csCounts, csSymperm, csAmd.csChol, csLu, csSpsolve, csSqr, csCounts, csSymperm, csAmd.F_jk = exp(−2πi·jk/n) as Complex[][], scale 'none' (default), 'sqrtn' (unitary) or 'n'enableGpu() / disableGpu() / isGpuEnabled() control it.A X Aᵀ − X + Q = 0 (see below)k largest/smallest eigenpairs of a symmetric A (see below){ re, im } pairs (skips the eigenvector computation)webgpu-pairing.md (not committed; bun run docs:deps writes it) lists 9 standalone > functions that route to the GPU (fuseUnaryChainAsync, fuseUnaryChainReduceAsync, > elementwiseChainGpuDispatch,…webgpu-pairing.md (not committed; bun run docs:deps writes it) lists 9 standalone > functions that route to the GPU (fuseUnaryChainAsync, fuseUnaryChainReduceAsync, > elementwiseChainGpuDispatch,…parallel — ComputePool may dispatch to worker threads when the typed path passes an op name and length meets that op's DEFAULT_THRESHOLD_BY_OP entry (for example matmul at 4,096 via poolOptions(..., 'matmul')). When the path calls shouldParallelize(n) without an op name, only the…parallel — ComputePool may dispatch to worker threads when the typed path passes an op name and length meets that op's DEFAULT_THRESHOLD_BY_OP entry (for example matmul at 4,096 via poolOptions(..., 'matmul')). When the path calls shouldParallelize(n) without an op name, only the…F_ij = |a_i − a_j|A^t = expm(t·logm(A)) for real t (principal logarithm required); integer t is exact repeated multiplicationf(A) returning a complex-valued matrix { re, im } — diagonal fast path, Lagrange-Sylvester interpolation for distinct eigenvalues, and confluent Hermite interpolation (Newton divided differences over repeated nodes) for defective/repeated-eigenvalue matrices. Defective matrices need derivatives of f: supply them analytically via optional fDerivs (fDerivs[k] = f^(k+1), machine precision) or they are approximated numerically (~1e-6). Throws only when f/a derivative is singular at a repeated eigenvalue (e.g. sqrt/log at 0)parallel — ComputePool may dispatch to worker threads when the typed path passes an op name and length meets that op's DEFAULT_THRESHOLD_BY_OP entry (for example matmul at 4,096 via poolOptions(..., 'matmul')). When the path calls shouldParallelize(n) without an op name, only the…parallel — ComputePool may dispatch to worker threads when the typed path passes an op name and length meets that op's DEFAULT_THRESHOLD_BY_OP entry (for example matmul at 4,096 via poolOptions(..., 'matmul')). When the path calls shouldParallelize(n) without an op name, only the…A x = λ B x (B nonsingular) via the eigendecomposition of B⁻¹A; eigenvalues match scipy.linalg.eig(A, B)n must be a power of 2 (H·Hᵀ = n·I), else RangeErrorc and optional last row r (r[0] ignored; default zeros)(n−1) × n orthonormal contrast rows, or the full n × n orthogonal matrix (first row 1/√n) when full is true1/(i+j+1) and its inverse from the exact integer closed form1/(i+j+1) and its inverse from the exact integer closed formenableGpu() / disableGpu() / isGpuEnabled() control it.L = D − A by default, or the symmetric normalized L_sym = I − D^(−1/2) A D^(−1/2) with { normalized: true }A — Bunch–Kaufman-pivoted LDLᵀf in the first row, survival rates s on the subdiagonal (s.length = f.length − 1)Ax = blogabsdet part of numpy slogdet), stable where log(det(A)) overflows; returns { sign, value } with det = sign · exp(value)k approximation in the Frobenius-norm sense via truncated SVD: A_k = U[:, :k] · diag(S[:k]) · V[:, :k]ᵀA = L·Q (L lower, Q has orthonormal rows), A = R·Q (R upper, orthonormal rows), A = Q·L (orthonormal columns, L lower)Ax = b via LUrcond·max(S) thresholding; the matrix package's routine under a non-colliding name (the typed pinv also accepts nested arrays)sqrt(sum(A_ij²))A — the leading columns of svd(A).U above a rank tolerance (default max(m, n) · S[0] · 2.22e-16){ real, imag, originalLength }{ real, imag }kind 'symmetric' (default), 'lower' or 'upper'; determinant 1{ value, vector } (defaults 1000 iterations, 1e-12)A = L·Q (L lower, Q has orthonormal rows), A = R·Q (R upper, orthonormal rows), A = Q·L (orthonormal columns, L lower){ Q, R, P, rank } with A[:, P] = Q·R; rank counts |R_ii| > tolerance·|R_00| (default 1e-10)(A, B); returns orthogonal Q, Z and upper-(quasi-)triangular AA, BB with A = Q·AA·Zᵀ, B = Q·BB·Zᵀ (matches scipy.linalg.qz; factors not unique)enableGpu() is process-global state — any dependency could flip it. Pass { gpu: true | false } as the last argument — third for fuseUnaryChainAsync / elementwiseChainGpuDispatch, fourth for fuseUnaryChainReduceAsync / elementwiseChainReduceGpuDispatch (or to…resetGpuFft(), GpuFftOptions, GpuFftResult.A = L·Q (L lower, Q has orthonormal rows), A = R·Q (R upper, orthonormal rows), A = Q·L (orthonormal columns, L lower)X ← (μX + (μX)⁻¹)/2min(m, n), all non-negative)sin(A) via funm, valid for any real spectrumAx = b (l lower / u upper diagonals) — band-limited Gaussian eliminationA and B in radians, descending like scipy.linalg.subspace_angles; small angles keep full relative accuracy{ U, S, V, rank }, S descendingsvds(A, k = 1, opts?) — the k largest singular triplets of a dense m × n matrix A, for large/sparse problems where a full svd (which factors the whole matrix) is wasteful. It runs the Lanczos iteration on the smaller of the two normal operators (AᵀA when m ≥ n, else A Aᵀ) — never forming that…AX + XB = CAx = d — the Thomas algorithm, O(n)c and first row r (defaults to c); constant along each diagonalTx = b (first column c, first row r) — Levinson–Durbin, O(n²)A, zeroing entries above the k-th diagonal (default k = 0)A, zeroing entries below the k-th diagonal (default k = 0)x; column j is xᵢ^(N-1-j) (numpy np.vander convention, N defaults to x.length), or xᵢ^j when increasing is true