问题
I have to handle sparse matrix that can occasionally be very big, nearing or exceeding RAM capacity. I also need to support mat*vec
and mat*mat
operations.
Since internally a csr_matrix
is 3 arrays data
, indices
and indptr
is it possible to create a csr matrix from numpy memmap.
回答1:
This works without any problems.
来源:https://stackoverflow.com/questions/49835342/using-memory-mapped-buffers-for-scipy-sparse