Skip to content

Commit 3002279

Browse files
authored
Remove linalg.lstsq (#240)
1 parent 3d81da4 commit 3002279

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

spec/extensions/linear_algebra_functions.md

-30
Original file line numberDiff line numberDiff line change
@@ -259,36 +259,6 @@ Computes the multiplicative inverse of a square matrix (or a stack of square mat
259259

260260
- an array containing the multiplicative inverses. The returned array must have a floating-point data type determined by {ref}`type-promotion` and must have the same shape as `x`.
261261

262-
(function-linalg-lstsq)=
263-
### linalg.lstsq(x1, x2, /, *, rtol=None)
264-
265-
Returns the least-squares solution to a linear matrix equation `Ax = b`.
266-
267-
#### Parameters
268-
269-
- **x1**: _<array>_
270-
271-
- coefficient array `A` having shape `(..., M, N)` and whose innermost two dimensions form `MxN` matrices. Should have a floating-point data type.
272-
273-
- **x2**: _<array>_
274-
275-
- ordinate (or "dependent variable") array `b`. If `x2` has shape `(..., M)`, `x2` is equivalent to an array having shape `(..., M, 1)`, and `shape(x2)` must be compatible with `shape(x1)[:-1]` (see {ref}`broadcasting`). If `x2` has shape `(..., M, K)`, each column `k` defines a set of ordinate values for which to compute a solution, and `shape(x2)[:-1]` must be compatible with `shape(x1)[:-1]` (see {ref}`broadcasting`). Should have a floating-point data type.
276-
277-
- **rtol**: _Optional\[ Union\[ float, <array> ] ]_
278-
279-
- relative tolerance for small singular values. Singular values less than or equal to `rtol * largest_singular_value` are set to zero. If a `float`, the value is equivalent to a zero-dimensional array having a data type determined by {ref}`type-promotion` (as applied to `x1` and `x2`) and must be broadcast against each matrix. If an `array`, must have a floating-point data type and must be compatible with `shape(x1)[:-2]` (see {ref}`broadcasting`). If `None`, the default value is `max(M, N) * eps`, where `eps` must be the machine epsilon associated with the floating-point data type determined by {ref}`type-promotion` (as applied to `x1` and `x2`). Default: `None`.
280-
281-
#### Returns
282-
283-
- **out**: _Tuple\[ <array>, <array>, <array>, <array> ]_
284-
285-
- a namedtuple `(x, residuals, rank, s)` whose
286-
287-
- first element must have the field name `x` and must be an array containing the least-squares solution for each `MxN` matrix in `x1`. The array containing the solutions must have shape `(N, K)` and must have a floating-point data type determined by {ref}`type-promotion`.
288-
- second element must have the field name `residuals` and must be an array containing the sum of squares residuals (i.e., the squared Euclidean 2-norm for each column in `b - Ax`). The array containing the residuals must have shape `(K,)` and must have a floating-point data type determined by {ref}`type-promotion`.
289-
- third element must have the field name `rank` and must be an array containing the effective rank of each `MxN` matrix. The array containing the ranks must have shape `shape(x1)[:-2]` and must have an integer data type.
290-
- fourth element must have the field name `s` and must be an array containing the singular values for each `MxN` matrix in `x1`. The array containing the singular values must have shape `(..., min(M, N))` and must have a floating-point data type determined by {ref}`type-promotion`.
291-
292262
(function-linalg-matmul)=
293263
### linalg.matmul(x1, x2, /)
294264

0 commit comments

Comments
 (0)