[IPython-User] Numpy polluting the notebook namespace?

Tony Yu tsyu80@gmail....
Fri Jul 27 13:48:53 CDT 2012


On Fri, Jul 27, 2012 at 2:37 PM, Junkshops <junkshops@gmail.com> wrote:

> -bash-4.1$ python
> Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47)
> [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> any
> <built-in function any>
>  >>> all
> <built-in function all>
>
> -bash-4.1$ ipython
> Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.13 -- An enhanced Interactive Python.
> *snip*
>
> In [1]: any
> Out[1]: <function any>
>
> In [2]: all
> Out[2]: <function all>
>
> In a new notebook:
> In [1]: any
>
> Out[1]: <function numpy.core.fromnumeric.any>
>
> In [2]: all
>
> Out[2]: <function numpy.core.fromnumeric.all>
>
> For some reason the builtins are masked by the numpy functions even when
> numpy isn't explicitly imported.
>
> -g
>
>
Are you sure that you're not telling IPython to do that in your config
files? For example, you might have the pylab value set in
your ipython_notebook_config.py:

     c.IPKernelApp.pylab = 'inline'

-Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120727/4fb0214b/attachment.html 


More information about the IPython-User mailing list