Skip to content

DEP: Finalize future warning move in lstsq default#25721

Merged
charris merged 1 commit intonumpy:mainfrom
seberg:rcond-lstsq
Jan 29, 2024
Merged

DEP: Finalize future warning move in lstsq default#25721
charris merged 1 commit intonumpy:mainfrom
seberg:rcond-lstsq

Conversation

@seberg
Copy link
Member

@seberg seberg commented Jan 29, 2024

NumPy 2.0 is clearly the (long overdue) time to do this...

Closes gh-11015

``np.linalg.lstsq`` now defaults to new ``rcond`` value
-------------------------------------------------------
`~numpy.linalg.lstsq` now uses the new rcond value of the machine precision
times ``max(M, N)``. Previously, the machine precision was used by a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some missing words here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The by was supposed to be a but, I think it's fine then? (sorry force pushed those two changes)

to keep using the old behavior, use ``rcond=-1``.
.. versionchanged:: 2.0
Previously, the default was ``-1``, but a warning was given that
this will change.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will -> would

NumPy 2.0 is clearly the (long overdue) time to do this...
@charris charris merged commit 80acab2 into numpy:main Jan 29, 2024
@charris
Copy link
Member

charris commented Jan 29, 2024

Thanks Sebastian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linalg.lstsq: Warn that using future default will break for numpy < 1.14

2 participants