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.
@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.
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.
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 ms391 ms1.58 s6.56 sThis PR:
11.6 ms43 ms179 ms727 ms