Conversation
151da12 to
8ab9143
Compare
stdlib/LinearAlgebra/src/lu.jl
Outdated
| i == 1 ? (return S.L) : | ||
| i == 2 ? (return S.U) : | ||
| i == 3 ? (return S.p) : | ||
| throw(BoundsError) |
There was a problem hiding this comment.
This throws the type, you want to throw an appropriate instance.
There was a problem hiding this comment.
Good catch! Fixed on next push. Thanks! :)
| Base.@deprecate_binding trace tr | ||
|
|
||
| # deprecate lufact to lu | ||
| @deprecate(lufact(S::LU), lu(S)) |
There was a problem hiding this comment.
Since it's a simple renaming rather than an API change, you can do the same thing as was done with trace above and just call Base.@deprecate_binding lufact lu
There was a problem hiding this comment.
I hesitate to broaden the deprecated signatures as *fact methods quite possibly exist outside stdlib. Thoughts?
There was a problem hiding this comment.
Deprecations from @deprecate_binding are impossible to find since they don't show a location.
|
Now covering |
Just to clarify, the reason we have those methods is to not break things like right? Then I say we deprecate them directly. IMO it is much cleaner to do or anyways, and we don't need to provide yet another way to access the parts...
Yes! |
Almost! :) Rather to avoid breaking as
My sentiments mirror yours :). Absent countervailing opinions, I will add deprecations for those methods once everything else is in order. Much thanks! |
|
Now covering |
|
Am I correct in assuming that the |
Correct! :) I plan to work through the remaining |
|
Now covering |
|
Now covers all mutating variants, including |
|
A bit more detail regarding Proceeding nonetheless per triage, but just to make certain this pitfall is well known :). |
|
Can't we just have the factorization object retuned by |
We could, yes, and I have been leaning towards that approach as well. Happily we already have |
|
It seems fine to me. Sometimes you want |
I'm sold then :). Laziness can be such a wonderful thing! |
|
This pull request now covers all decompositions (mutating variants included) and deprecates the transitional |
|
Proposal: Spell out looks pretty nice. Edit: Additionally |
|
Being a little less cryptic with some of these factorization names would not hurt. |
|
Agreed, |
|
I would definitely rename |
|
Cheers for consensus on the renames! :) I would prefer to do the renames in downstream pull requests. So absent objections or requests for time, I plan to merge this pull request shortly after CI for the last commit clears (perhaps this evening or tomorrow morning PST). Best! |
|
@simonbyrne (much thanks!) observed that these changes will break code like |
|
I guess this is where using |
|
Superseded by #27212, which will incorporate the renames to reduce breakage. Much thanks for the fantastic input all, and particularly @fredrikekre and @simonbyrne for pivotal pieces! :) |
This pull request implements the new approach to #26997. That is, this pull request deprecates
lufact[!],eigfact[!],schurfact[!],lqrfact[!],qrfact[!],bkfact[!],cholfact[!],ldltfact[!],hessfact[!], andsvdfact[!]tolu[!],eig[!],schur[!],lq[!],qr[!],bk[!],chol[!],ldlt[!],hess[!], andsvd[!]respectively, clobbering existing methods of the latter functions. To facilitate this deprecation, this pull request adds destructuring via iteration to decomposition objects, andgetindex(S::($DecompositionType), i::Integer)methods that yield the decomposition components produced by iteration.Decision points: 1)
Should theDeprecated, and done. 2)getindex(S::$(Decomposition), i::Integer)methods be left in place indefinitely, or immediately deprecated?Should we deprecate e.g.Yes, and done.lufact!tolu!simultaneously?Best!