Using memory mapped buffers for scipy sparse

2019-08-22 01:51发布

问题:

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.