Skip to content

Add specification for computing the eigenvalues of a symmetric matrix (linalg: eigvalsh) #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions spec/API_specification/linear_algebra_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,33 @@ Returns the eigenvalues and eigenvectors of a symmetric matrix (or a stack of sy
Eigenvalue sort order is left unspecified.
```

(function-eigvalsh)=
### eigvalsh()
(function-linalg-eigvalsh)=
### linalg.eigvalsh(x, /, *, upper=False)

TODO
Computes the eigenvalues of a symmetric matrix (or a stack of symmetric matrices) `x`.

<!-- NOTE: once complex number support, each matrix must be Hermitian -->

#### Parameters

- **x**: _&lt;array&gt;_

- input array having shape `(..., M, M)` and whose innermost two dimensions form square matrices. Must have a floating-point data type.

- **upper**: _bool_

- If `True`, use the upper-triangular part to compute the eigenvalues. If `False`, use the lower-triangular part to compute the eigenvalues. Default: `False`.

#### Returns

- **out**: _&lt;array&gt;_

- an array containing the computed eigenvalues. The returned array must have shape `(..., M)` and have the same data type as `x`.

```{note}

Eigenvalue sort order is left unspecified.
```

(function-einsum)=
### einsum()
Expand Down