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.
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 suppliedscipy.sparse.csc_matrix
, which is more complicated that it should be due toscipy.sparse
's insistence on falling back to int32 for the column indices and row pointers of small matrices.