使用内存映射的缓冲区进行稀疏 [英] Using memory mapped buffers for scipy sparse

查看:71
本文介绍了使用内存映射的缓冲区进行稀疏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须处理稀疏矩阵,该矩阵有时可能非常大,接近或超过RAM容量.我还需要支持mat*vecmat*mat操作.

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.

由于内部csr_matrix是3个数组dataindicesindptr,因此可以从numpy memmap创建csr矩阵.

Since internally a csr_matrix is 3 arrays data, indices and indptr is it possible to create a csr matrix from numpy memmap.

推荐答案

该方法没有任何问题.

这篇关于使用内存映射的缓冲区进行稀疏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆