I have a file called main.py
, which references another file Optimisers.py
which only has functions in it and is used in a for
loop in main.py
. These functions have different optimisation functions in them.
This Optimisers.py
then references two other similar files with only functions in them as well, which are in while
loops. All of these files use numpy.
I believe that is because of the loops with functions calling on and creating arrays in numpy, which is leading to a memory overload. Therefore I cannot finish some optimisation algorithms, or cycle through all the possible coordinates I would like to.
How do I ensure removal of variables in numpy? As I understand it, numpy's C libraries complicate the standard Python process. What does the %reset array
command (from the link below) do? And where should I implement it?
P.S. I've read "Releasing memory of huge numpy array in IPython",
and gc.collect()
does not work either.