divrot in an infinitesimal box

Julia, python, algorithmのメモです

Python / Jupyterでのmoduleを自動再読み込みする

Jupyterでテストをして最中なんだけど、エディターでモジュールの変更をして、反映させたいというとき、 もう一度

import hoge

とやってもだめである。 そこでautoreloadを読んでおくと、ちゃんと反映される

%load_ext autoreload

%autoreload 2

http://ipython.readthedocs.org/en/stable/config/extensions/autoreload.html?highlight=autoreload