nicolas
nicolas

Reputation: 9815

numpy shadowing builtin function : what is the fully qualified name for built in function?

I use IPython which opens numpy automatically, as far as I understand.

This redefines the builtin function 'sum' which I'd like to access.

How can I get a hold on it ?

ps : I think I got it :

import __builtin__ as base

base.sum

from tfm

Upvotes: 2

Views: 393

Answers (2)

Matt
Matt

Reputation: 27843

using --pylab or equivalent import numpy in global namespace (as well as other stuff) you should set import_all to false if you don't want it.

Upvotes: 1

ev-br
ev-br

Reputation: 26070

I guess you did something to your ipython config.

IPython 0.13.2 -- An enhanced Interactive Python.
<snip>

In [1]: sum?
Type:       builtin_function_or_method
String Form:<built-in function sum>
Namespace:  Python builtin

Upvotes: 0

Related Questions