-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove implicit pinvs of vectors #1165
Comments
Yes, it does seem like we need to wait until 2.0. We could prepare a PR and run package evaluator to see how breaking it is. If not, we could just roll it out. |
One could argue that |
That'd be even more breaking and a lot more controversial, but I'd be in favor also. Another possibility is to keep \ as is, but remove / entirely. It's very rarely useful as a matrix-vector op (because of the "vectors are columns" convention), and many people don't even know it exists. I've only ever used it for change of basis (eg P * D / P) |
I use I like the principle of It's the fact that either uses least squares that's the problem, particularly since it's completely inconsistent between square and rectangular matrices: julia> zeros(1,1) \ [1]
1-element Vector{Float64}:
Inf
julia> zeros(2,1) \ [1,1]
1-element Vector{Float64}:
0.0
julia> pinv(zeros(1,1)) * [1]
1-element Vector{Float64}:
0.0 Having a distinct syntax would fix this. |
Pseudo-inverses are |
Agree that removing the |
Also ref. #554 regarding making |
Fix for the scalar case in JuliaLang/julia#44358 |
This is breaking, so probably has to wait until 2.0. At that point, can we remove
/(x::Number, v::AbstractVector)
? Its (marginal) utility is outmatched by its potential for confusion for new users and subtle bugs even for more experienced coders. More generally there are two and only two places where we callpinv
on vectors implicitly:I think we should just remove both. Pinv of a vector is just too confusing to be called implicitly. In fact, this is even more confusing because we don't allow
number / matrix
ormatrix \ number
, although pinv of a matrix makes way more sense than pinv of a vector. The fact that nobody has bothered adding this makes me think this function won't be missed.The text was updated successfully, but these errors were encountered: