Within ipython notebook I call a function imported from my own module and run some code. I have noticed that if I change the code in the function (outside of notebook) and execute the notebook the old version of the function runs.
Either ipython notebook or firefox seems to be caching the module which I can clear with ctrl-F5, when I remember. Is there an ipython notebook function call to ensure I am running the newest code?
Put in the following two cells at the beggining of your code and it will automatically reload any new version of your code:
%load_ext autoreload
%autoreload 2
import ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With