Python/Numpy MemoryError

前端 未结 3 931
感情败类
感情败类 2020-11-29 05:12

Basically, I am getting a memory error in python when trying to perform an algebraic operation on a numpy matrix. The variable u, is a large matrix of double (i

3条回答
  •  情书的邮戳
    2020-11-29 05:51

    Your matrix has 288x288x156=12,939,264 entries, which for double could come out to 400MB in memory. numpy throwing a MemoryError at you just means that in the function you called the memory needed to perform the operation wasn't available from the OS.

    If you can work with sparse matrices this might save you a lot of memory.

提交回复
热议问题