Currently I am trying to do 3000 iterations of some function using a for-loop (using Spyder). The function however, which I imported from a package, contains a bug. Because of the bug, the function gets slower with every iteration. When I restart the IPython console, the function is fast again but it again gets slower with every iteration.
So, this is what I want to do:
- Run (for example) 100 iterations
- Restart console
- Run the next 100 iterations
- Restart console
And so forth, until I've done 3000 iterations.
I know this sounds like a cumbersome process but I don't know how to do it differently since I don't have the skills (and time) to debug the complicated function I am using.
Thanks in advance