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 1 commit
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
Prev Previous commit
Next Next commit
Update specifications
  • Loading branch information
kgryte committed Apr 12, 2021
commit 3f1ad4d3d9ca32e6ae185106e80f5ce683abfa0f
71 changes: 10 additions & 61 deletions spec/API_specification/linear_algebra_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,51 +105,26 @@ TODO
(function-eig)=
### eig(x, /)

Computes the eigenvalues and eigenvectors of a square matrix (or stack of square matrices) `x`.
Computes the eigenvalues and eigenvectors 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 data type of either `float32` or `float64`.
- 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 and whose second element must have shape `(..., M, M)`and have the columns of the inner most matrices contain the computed eigenvectors.

```{note}

Eigenvalue sort order is left unspecified.
```

(function-eigh)=
### eigh(x, /, *, upper=False)

Returns the eigenvalues and eigenvectors of a symmetric matrix (or 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 data type of either `float32` or `float64`.

TODO: support complex numbers

- **upper**: _bool_

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

#### Returns

- **out**: _Tuple\[ &lt;array&gt; ]_
- 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.

- a namedtuple (`e`, `v`) whose first element must have shape `(..., M)` and consist of computed eigenvalues and whose 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}

Expand All @@ -159,13 +134,13 @@ Eigenvalue sort order is left unspecified.
(function-eigvals)=
### eigvals(x, /)

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

#### Parameters

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

- input array having shape `(..., M, M)` and whose innermost two dimensions form square matrices. Must have a data type of either `float32` or `float64`.
- 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

Expand All @@ -175,33 +150,7 @@ Computes the eigenvalues of a square matrix (or stack of square matrices) `x`.

- an array containing the computed eigenvalues. The array must have shape `(..., M)`.

```{note}

Eigenvalue sort order is left unspecified.
```

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

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

#### Parameters

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

- input array having shape `(..., M, M)` and whose innermost two dimensions form square matrices. Must have a data type of either `float32` or `float64`.

TODO: support complex numbers

- **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 array must have shape `(..., M)`.
TODO: add note regarding return data type.

```{note}

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy