(A Creative Blog Name Here)

Code, math, and other things I find useful

Matplotlib 3D plots in IPython

Summary:

Assume that

import matplotlib.pyplot as plt

has been executed.

When using mplot3d in IPython you have to manually draw the axes which can be done using the plt.draw function (or plt.plot([],[])).
For some reason the axes are not automatically drawn as with 2d plots.

The full ...

Extracting keys from Python dict into interpreter namespace

I run a lot of experiments in ipython, the results of which I pickle and save to disk. When I reload the results with pickle I end up with a dict whose keys are the variable names that I saved. It is tedious to have to reference these values through ...

IPython parallel

When I start IPython the first two commands I run are

%load_ext autoreload
%autoreload 2

which forces IPython to reload code before running it so that the newest version is always used. However, when developing code to run in parallel with the IPython.parallel module on a cluster started with ...