Skip to content
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

Improve docstring for optax.power_iteration. #1215

Merged
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
6 changes: 6 additions & 0 deletions optax/_src/linear_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def power_iteration(
of a diagonalizable matrix. This matrix can be given as an array or as a
callable implementing a matrix-vector product.

If a matrix has a dominant eigenvalue, then the magnitude of that eigenvalue equals
the spectral radius of the matrix.

Note that a matrix might not have a dominant eigenvalue, that is, an eigenvalue that
is `strictly` greater in magnitude than any other eigenvalue.

Args:
matrix: a square matrix, either as an array or a callable implementing a
matrix-vector product.
Expand Down