Add backwards compatibility for NormalCG and add deprecation warning#190
Merged
patrick-kidger merged 3 commits intopatrick-kidger:devfrom Jan 27, 2026
Merged
Conversation
- Added **kwargs support to NormalCG function signature - Added DeprecationWarning directing users to use lx.Normal(lx.CG(...)) instead - Added docstring with deprecation notice - Imported warnings module
- Use "in favour of" phrasing (consistent with Diffrax) - Add backticks around code examples - Specify "in some future version of Lineax" - Keep DeprecationWarning category (more semantically correct) - Update both warning message and docstring
Owner
|
LGTM! Thank you :) I'm inclined to get the current release out (as I'd like to do a Diffrax release on the back of it), but I'd be happy to do another fast-follow release with your other PRs. |
patrick-kidger
pushed a commit
that referenced
this pull request
Jan 27, 2026
…190) * Deprecate NormalCG helper function - Added **kwargs support to NormalCG function signature - Added DeprecationWarning directing users to use lx.Normal(lx.CG(...)) instead - Added docstring with deprecation notice - Imported warnings module * Align deprecation warning with Diffrax patterns - Use "in favour of" phrasing (consistent with Diffrax) - Add backticks around code examples - Specify "in some future version of Lineax" - Keep DeprecationWarning category (more semantically correct) - Update both warning message and docstring * fix precommit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thought I'd try get this in in light of the upcoming release, I find that
lx.NormalCG(rtol=..., atol=...)no longer works as our helper function only accepts positional arguments.Super looking forward to the new release, it will greatly clean up a
ProjectionOperatorI've been using that uses a linear solver internally that I had to special case to tell square solves to solve normal equations instead. Thanks for all the great work everyone's put in, especially on LSMR! Do we have a special way of testing whether a solver can handle rectangular matrices?Will also try to brush of my other PR's today if there's still time for that.