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

后端 未结 5 1210
自闭症患者
自闭症患者 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:49

    Since numpy 1.7 there exists a semi built-in way to track memory allocations:

    https://github.com/numpy/numpy/tree/master/tools/allocation_tracking

提交回复
热议问题