Python wrappers
Public Python APIs implemented by this engine symbol.Compute eigenvalues and right eigenvectors of a square float matrix.
Math
Returns such that , equivalently for each column of .
Shape
- Input
a:(..., n, n) - Output
w:(..., n) - Output
V:(..., n, n)
See Also
[[eigh_op]] : Symmetric / Hermitian specialisation (preferred when applicable — faster, real outputs, autograd-friendly).
Parameters
aconst TensorImplPtr&Square float tensor of shape
(..., n, n). Leading dimensions are treated as independent batch axes — one decomposition per batch element. Must be at least 2-D and floating-point.Returns
std::vector<TensorImplPtr>Two-element vector {w, V} where: - w has shape (..., n) — one eigenvalue per column of (real part only; see Notes on complex spectra). - V has shape (..., n, n) — columns are the right eigenvectors, normalised to unit Euclidean length.
Raises
LinAlgErrorWhen
a is not at least 2-D, not square, or not float-typed. Also if LAPACK fails to converge (rare; reported via info > 0).Notes
Outputs are leaf nodes — autograd is not wired. See header-level Notes for the deferred backward formula and its caveats.
Examples
In Python (via [[lucid.linalg.eig]]):
>>> A = lucid.tensor([[2.0, 0.0], [0.0, 3.0]])
>>> w, V = lucid.linalg.eig(A)
>>> w
Tensor([2., 3.])