Skip to content

Remove axis kwarg support from linalg.matrix_norm #321

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

Merged
merged 1 commit into from
Nov 9, 2021
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
12 changes: 4 additions & 8 deletions spec/extensions/linear_algebra_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,23 +261,19 @@ Returns the multiplicative inverse of a square matrix (or a stack of square matr
Alias for {ref}`function-matmul`.

(function-linalg-matrix-norm)=
### linalg.matrix_norm(x, /, *, axis=(-2, -1), keepdims=False, ord='fro')
### linalg.matrix_norm(x, /, *, keepdims=False, ord='fro')

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

#### Parameters

- **x**: _<array>_

- input array. Must have at least `2` dimensions. Should have a floating-point data type.

- **axis**: _Tuple\[ int, int ]_

- a 2-tuple which specifies the axes (dimensions) defining two-dimensional matrices for which to compute matrix norms. Negative indices must be supported. Default: `(-2, -1)` (i.e., the last two-dimensions).
- input array having shape `(..., M, N)` and whose innermost two dimensions form `MxN` matrices. Should have a floating-point data type.

- **keepdims**: _bool_

- If `True`, the axes (dimensions) specified by `axis` must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see {ref}`broadcasting`). Otherwise, if `False`, the axes (dimensions) specified by `axis` must not be included in the result. Default: `False`.
- If `True`, the last two axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see {ref}`broadcasting`). Otherwise, if `False`, the last two axes (dimensions) must not be included in the result. Default: `False`.

- **ord**: _Optional\[ Union\[ int, float, Literal\[ inf, -inf, 'fro', 'nuc' ] ] ]_

Expand Down Expand Up @@ -309,7 +305,7 @@ Computes the matrix norm of a matrix (or a stack of matrices) `x`.

- **out**: _<array>_

- an array containing the norms. If `keepdims` is `False`, the returned array must have a rank which is two less than the rank of `x`. The returned array must have a floating-point data type determined by {ref}`type-promotion`.
- an array containing the norms for each `MxN` matrix. If `keepdims` is `False`, the returned array must have a rank which is two less than the rank of `x`. The returned array must have a floating-point data type determined by {ref}`type-promotion`.

(function-linalg-matrix_power)=
### linalg.matrix_power(x, n, /)
Expand Down