-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
FIX: support_enumeration: Use _numba_linalg_solve
#311
Conversation
"LinAlgError: Matrix is singular to machine precision.” raised
For use in a jitted function in nopython mode * Call directly Numba internal `numba_xgesv` * Return nonzero int if input matrix is singular, allowing alternative to try-except np.linalg.LinAlgError
Remove `is_singular` by svd
Allow `cache=True`, close #285
function. The data in `a` and `b` are interpreted in Fortran order, | ||
and dtype of `a` and `b` must be the same, one of {float32, float64, | ||
complex64, complex128}. `a` and `b` are modified in place, and the | ||
solution is stored in `b`. *No error check is made for the inputs.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oyamad is it standard convention to return the solution in b
and not explicitly return the solution and a status code from the function as a tuple?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if I understand your question, but here is where this is used, where it is check whether matrix A
is nonsingular (instead of try
-except
which is not available in nopython mode), and in case A
is singular I don't know what is in there in b
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah. I see. In the code example b
is out
and it is modified in place (rather than returned). Thanks @oyamad
Thanks @oyamad. I just have one This is looking great. I will leave this open for one day and then merge tomorrow. |
_numba_linalg_solve
, which calls directly Numba internalnumba_xgesv
.Current version:
99.1 ms
391 ms
1.58 s
6.56 s
This PR:
11.6 ms
43 ms
179 ms
727 ms