[Numpy-discussion] Synonym standards

Fernando Perez fperez.net@gmail....
Fri Jul 27 13:30:36 CDT 2012

On Fri, Jul 27, 2012 at 9:43 AM, Derek Homeier
<derek@astro.physik.uni-goettingen.de> wrote:
> thanks, that was exactly what I was looking for - together with
> c.TerminalIPythonApp.exec_lines = ['import sys',
>                                    'import numpy as np',
>                                    'import matplotlib as mpl',
>                                    'import matplotlib.pyplot as plt']

Note that if you do this only and don't use %pylab interactively or
the --pylab flag, then you will *not* get the proper non-blocking
control of the matplotlib event loop integrated with the terminal or

In summary, following Tony's suggestion is enough to give you:

- event loop integration when you do --pylab at the prompt or %pylab in ipython.
- the np, mpl and plt shortcuts
- no 'import *' at all.

So that should be sufficient, but you should still use --pylab or
%pylab to indicate to IPython that you want the mpl event loops to
work in conjunction with the shell.



More information about the NumPy-Discussion mailing list