From ee810a0ea39d6d8a3465eac986d42cb938c9fd7a Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Mon, 12 Apr 2021 09:39:54 -0700 Subject: [PATCH 1/3] Add svdvals specification --- .../linear_algebra_functions.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/API_specification/linear_algebra_functions.md b/spec/API_specification/linear_algebra_functions.md index 100efccf2..3e5436875 100644 --- a/spec/API_specification/linear_algebra_functions.md +++ b/spec/API_specification/linear_algebra_functions.md @@ -279,6 +279,23 @@ TODO TODO +(function-svdvals)= +### svdvals(x, /) + +Computes the singular values of a matrix (or stack of matrices) `x`. + +#### Parameters + +- **x**: _<array>_ + + - input array having shape `(..., M, N)` and whose innermost two dimensions form matrices on which to perform singular value decomposition. Should have a floating-point data type. + +#### Returns + +- **out**: _Union\[ <array>, Tuple\[ <array>, ... ] ]_ + + - an array with shape `(..., K)` that contains the vector(s) of singular values of length `K`. For each vector, the singular values must be sorted in descending order by magnitude, such that `s[..., 0]` is the largest value, `s[..., 1]` is the second largest value, et cetera. The first `x.ndim-2` dimensions must have the same shape as those of the input `x`. The returned array must have the same floating-point data type as `x`. + (function-trace)= ### trace(x, /, *, axis1=0, axis2=1, offset=0) From ffd84b5e161719873baca75135d33e1160729803 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Mon, 12 Apr 2021 09:49:58 -0700 Subject: [PATCH 2/3] Add article --- spec/API_specification/linear_algebra_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/API_specification/linear_algebra_functions.md b/spec/API_specification/linear_algebra_functions.md index 3e5436875..a60fee622 100644 --- a/spec/API_specification/linear_algebra_functions.md +++ b/spec/API_specification/linear_algebra_functions.md @@ -282,7 +282,7 @@ TODO (function-svdvals)= ### svdvals(x, /) -Computes the singular values of a matrix (or stack of matrices) `x`. +Computes the singular values of a matrix (or a stack of matrices) `x`. #### Parameters From 1b736d945ff98b304c621dfd2428e3500df741a8 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Mon, 26 Apr 2021 02:32:28 -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 a60fee622..54f66699b 100644 --- a/spec/API_specification/linear_algebra_functions.md +++ b/spec/API_specification/linear_algebra_functions.md @@ -279,8 +279,8 @@ TODO TODO -(function-svdvals)= -### svdvals(x, /) +(function-linalg-svdvals)= +### linalg.svdvals(x, /) Computes the singular values of a matrix (or a stack of matrices) `x`.