Releasing memory of huge numpy array in IPython Releasing memory of huge numpy array in IPython python python

Releasing memory of huge numpy array in IPython


Are you looking at the value? IPython caches output variables as e.g. Out[8], so if you examine it, it will be kept in memory.

You can do %xdel testcube to delete the variable and remove it from IPython's cache. Alternatively, %reset out or %reset array will clear either all your output history, or only references to numpy arrays.