Profile Memory Allocation in Python (with support for Numpy arrays)

后端 未结 5 1229
自闭症患者
自闭症患者 2020-12-13 10:03

I have a program that contains a large number of objects, many of them Numpy arrays. My program is swapping miserably, and I\'m trying to reduce the memory usage, because it

5条回答
  •  情话喂你
    2020-12-13 10:45

    Can you just save/pickle some of the arrays to disk in tmp files when not using them? That's what I've had to do in the past with large arrays. Of course this will slow the program down, but at least it'll finish. Unless you need them all at once?

提交回复
热议问题