And generally I would try to follow numpy.linalg
and the functions it provides, not implement random stuff from Rust nalgebra.
And please keep the naming scheme consistent. If this is replacing np.linalg.inv
, it should be called np_linalg_inv
, not try_invert_to
.
Why can't we just follow the numpy API and raise this exception on failure, instead of returning True/False?
Poorly written comment. If nalgebra methods are added or removed, it will go out of sync.
Alarm bells should be ringing when you compare this entry to the others.
And the crate should not be named "externfns" but "nalgebra_c" (or similar) and should be part of demo, not core/codegen.
If the purpose of the DSO is to make the lli tests work, I would just get rid of the latter. The lli tests increase complexity and AFAICT don't really help find bugs.