-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
1 / [1,2,3] returns nonsense #25431
Comments
You're looking at the Moore-Penrose pseudoinverse: julia> (1/[1,2,3]) * [1,2,3]
0.9999999999999999 https://docs.julialang.org/en/stable/stdlib/linalg/#Base.LinAlg.pinv The way to find out out about these things is by calling
which will point you to Thanks for opening an issue, @mohamed82008 ! @andreasnoack is right in closing this, though. |
I know about |
It's pretty surprising to me too. @martinholters, why was |
There is no matrix here. It is |
@andreasnoack, we didn't used to allow solving systems by I realize that we can assign this a meaning, but I'm not sure we should. An expression like this seems more likely to be a user error... |
Reason for allowing it is that rowvector*vector gives a scalar and it seems natural for the inverse operation - the division - to work, at least in the sense it works for matrices. |
I see. To put it another way, you want to have associativity |
Tracking down this thread to figure out exactly what |
The text was updated successfully, but these errors were encountered: