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
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