[IPython-User] Numpy polluting the notebook namespace?

Junkshops junkshops@gmail....
Fri Jul 27 13:37:40 CDT 2012


-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



More information about the IPython-User mailing list