PyPardisoProject
PyPardisoProject copied to clipboard
ENH: manually set iparm & support `overwrite_b` parameter
-
Manually set the iparm so that:
-
iparm(2)=103to use an OMP version of fill-in reduce algorithm withL=10optimization -
iparm(6)=0 or 1depends on overwrite b or not -
iparm(35)=1to use 0-based indexing, hence no need to add 1 foriaandja
-
-
Support
overwrite_bparameter:- if
bgot an implicit copy in_check_b()(c_contiguous->f_contiguousorbis not contiguous), oroverwrite_b=Trueis explicitly provided by the user, however currently the ans array still need to be allocated (I change it tonp.empty_like(b)to avoid a 0-fill overhead) because PARDISO will try to overwritexwith 0 ifiparm(6)=1 - removed
return np.ascontiguousarray(x)in_call_pardiso(), in case user can benefit from keepingf_contiguouswithoverwrite_b=Trueor multiplicate ccontig matrix with fcontig matrix, etc.
- if
-
pytest result: 1 failed, 23 passed. There is a "ValueError: scipy.sparse does not support dtype float16." I guess it is not from my changes?