Numpy efficient big matrix multiplication

后端 未结 2 1895
温柔的废话
温柔的废话 2021-02-03 14:02

To store big matrix on disk I use numpy.memmap.

Here is a sample code to test big matrix multiplication:

import numpy as np
import time

rows= 10000 # it         


        
2条回答
  •  面向向阳花
    2021-02-03 14:38

    Dask.array provides a numpy interface to large on-disk arrays using blocked algorithms and task scheduling. It can easily do out-of-core matrix multiplies and other simple-ish numpy operations.

    Blocked linear algebra is harder and you might want to check out some of the academic work on this topic. Dask does support QR and SVD factorizations on tall-and-skinny matrices.

    Regardless for large arrays, you really want blocked algorithms, not naive traversals which will hit disk in unpleasant ways.

提交回复
热议问题