Return just the solution in linalg.lstsq
#227
Labels
API change
Changes to existing functions or objects in the API.
topic: Linear Algebra
Linear algebra.
Description
linalg.lstsq
is possibly one of the most algorithmically complex operations that the API supports. On top of that, it returns quite a bit of extra information besides the result: theresiduals
, therank
, and thesingular_values
.The specification of the returns was discussed in this PR.
Problems
linalg.svdvals
andlinalg.matrix_rank
or simply justlinalg.svd
.linalg.solve
, which just returns the solutions. As such, their APIs should be comparable.Proposal
Let
linalg.lstsq
return just the solution of the problem.TODO
Have a look in scipy or other libraries and see how is this function used, whether users do actually use all the returned values or just the solution. It may very well be the case that users are just using the solution in most cases, similar to what happened with
full_matrices=False
in SVDcc @asmeurer @rgommers @kgryte
The text was updated successfully, but these errors were encountered: