-
-
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
Error: stack overflow when solving linear system for different types #1418
Comments
It looks like these two generic definitions are getting involved: \(x,y) = y/x
(/)(A::StridedVecOrMat, B::StridedVecOrMat) = (B' \ A')' (for your reference, found using |
Thank you. In particular for pointing to Is it right to have right division as the fall back behaviour for left division? I would think of it more as a special feature for numbers maybe. If it is right, I can fix the matrix devision to catch this issue. |
Yes, we should really just implement this case by calling LAPACK, rather than depending on the fallback. It would also end up having better performance, due to avoiding the transpose. While fixing this, it is also worthwhile to implement the various ldiv/rdiv transpose operators, by dispatching to LAPACK and avoiding the computation of the transposes.
|
I shall give it a try, but I would like to hear the argument for having (x::Any,y::Any)=x/y and not restricting it to (x::Number,y::Number)=x/y. |
Note that it is actually defined as |
The idea is that there is a set of "core operators" (sounds ilke something to document!) that are the minimal ones to implement, and other operators can be derived from those if necessary. |
But is it necessary to have these core operators defined for Any? Maybe I do not get it, but I think that they are only core for number types. Could they be restricted to numbers? |
I think that is probably the right thing to do. |
Yes, it does seem sensible to restrict to Number. |
I think restricting this to Number is definitely the right way to go. |
Pull request #1427 solves this issue. |
I am puzzled by
as I cannot understand why it is not returning a "no method" error.
The text was updated successfully, but these errors were encountered: