[SciPy-user] How to solve name mangling ?

Anne Archibald peridot.faceted@gmail....
Sat Jun 9 02:01:29 CDT 2007


On 08/06/07, Ryan May <rmay@ou.edu> wrote:

> with no other code changes. I'm assuming we're talking about long term
> maintained code, and not just a quick script.  For that case I do the:
>
> import numpy as N
> import pylab as P

I would take this a step further, and point out that for *interactive*
code - i.e. typed at the ipython prompt - it's probably easier to do
"from numpy import *".

I'd also like to reiterate that scipy does not provide a function
"array". If you import scipy, for some strange reason, it sets
scipy.array to numpy.array - that is, for some reason scipy provides
copies of a large number of numpy functions. Not reimplementations,
not accelerated versions, just exactly the same functions under
different names. Why is this?

Anne M. Archibald


More information about the SciPy-user mailing list