I am using iPython to run my code. I wonder if there is any module or command which would allow me to check the memory usage of an object. For instance:
In [
If you are using a numpy array, then you can use the attribute ndarray.nbytes to evaluate its size in memory:
ndarray.nbytes
from pylab import * d = array([2,3,4,5]) d.nbytes #Output: 32