icecube / photospline

https://docs.icecube.aq/photospline/v2.0.7/
BSD 2-Clause "Simplified" License
5 stars 12 forks source link

Expose sparse NNLS to Python #42

Closed jvansanten closed 7 months ago

jvansanten commented 7 months ago

There seem to be no other sparse implementations of Lawson-Hanson NNLS accessible from Python, so let's expose the one we ship in photospline.

Almost all of the new code is there to build a cholmod_sparse view into the supplied scipy.sparse.csc_matrix, which is more complicated that it should be due to scipy.sparse's insistence on falling back to int32 for the column indices and row pointers of small matrices.