diff --git a/spec/API_specification/linear_algebra_functions.md b/spec/API_specification/linear_algebra_functions.md index 100efccf2..7cf85d29c 100644 --- a/spec/API_specification/linear_algebra_functions.md +++ b/spec/API_specification/linear_algebra_functions.md @@ -103,14 +103,59 @@ Returns the specified diagonals. If `x` has more than two dimensions, then the a TODO (function-eig)= -### eig() +### eig(x, /) -TODO +Computes the eigenvalues and eigenvectors of a square matrix (or a stack of square matrices) `x`. -(function-eigvalsh)= -### eigvalsh() +#### Parameters -TODO +- **x**: _<array>_ + + - input array having shape `(..., M, M)` and whose innermost two dimensions form square matrices. Must have a floating-point data type. + + TODO: support complex numbers + +#### Returns + +- **out**: _Tuple\[ <array> ]_ + + - a namedtuple (`e`, `v`) whose + + - first element must have shape `(..., M)` and consist of computed eigenvalues + - second element must have shape `(..., M, M)`and have the columns of the inner most matrices contain the computed eigenvectors. + + TODO: add note regarding return types + +```{note} + +Eigenvalue sort order is left unspecified. +``` + +(function-eigvals)= +### eigvals(x, /) + +Computes the eigenvalues of a square matrix (or a stack of square matrices) `x`. + +#### Parameters + +- **x**: _<array>_ + + - input array having shape `(..., M, M)` and whose innermost two dimensions form square matrices. Must have a floating-point data type. + + TODO: support complex numbers + +#### Returns + +- **out**: _<array>_ + + - an array containing the computed eigenvalues. The array must have shape `(..., M)`. + + TODO: add note regarding return data type. + +```{note} + +Eigenvalue sort order is left unspecified. +``` (function-einsum)= ### einsum()