Skip to content

WIP: Add specifications for computing eigenvalues and eigenvectors #113

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

Closed
wants to merge 3 commits into from
Closed
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
55 changes: 50 additions & 5 deletions spec/API_specification/linear_algebra_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down