From 596e60529f8fb09f072ec7d96696ac2413f1beaf Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Mon, 12 Apr 2021 11:13:02 -0700 Subject: [PATCH 1/3] Add eigvalsh --- .../linear_algebra_functions.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/spec/API_specification/linear_algebra_functions.md b/spec/API_specification/linear_algebra_functions.md index 100efccf2..27a328e66 100644 --- a/spec/API_specification/linear_algebra_functions.md +++ b/spec/API_specification/linear_algebra_functions.md @@ -112,6 +112,34 @@ TODO TODO +(function-eigvalsh)= +### eigvalsh(x, /, *, upper=False) + +Computes the eigenvalues of a symmetric matrix (or a stack of symmetric 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. + +- **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**: _<array>_ + + - 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() From 0b1e6e80184148ce1908a65a3b0ea20c240d0d35 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Mon, 12 Apr 2021 11:23:13 -0700 Subject: [PATCH 2/3] Fix duplicate target --- spec/API_specification/linear_algebra_functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/API_specification/linear_algebra_functions.md b/spec/API_specification/linear_algebra_functions.md index 27a328e66..fc4d7a4a5 100644 --- a/spec/API_specification/linear_algebra_functions.md +++ b/spec/API_specification/linear_algebra_functions.md @@ -107,8 +107,8 @@ TODO TODO -(function-eigvalsh)= -### eigvalsh() +(function-eigvals)= +### eigvals() TODO From d2337a4070fb85bda436c945a8d632261f1639de Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Mon, 26 Apr 2021 02:24:41 -0700 Subject: [PATCH 3/3] Move API to submodule --- spec/API_specification/linear_algebra_functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/API_specification/linear_algebra_functions.md b/spec/API_specification/linear_algebra_functions.md index fc4d7a4a5..9fdec54df 100644 --- a/spec/API_specification/linear_algebra_functions.md +++ b/spec/API_specification/linear_algebra_functions.md @@ -112,8 +112,8 @@ TODO TODO -(function-eigvalsh)= -### eigvalsh(x, /, *, upper=False) +(function-linalg-eigvalsh)= +### linalg.eigvalsh(x, /, *, upper=False) Computes the eigenvalues of a symmetric matrix (or a stack of symmetric matrices) `x`.