[Numpy-discussion] Import NumPy in Self-defined function script

Gael Varoquaux gael.varoquaux@normalesup....
Sun Feb 22 17:51:18 CST 2009


On Mon, Feb 23, 2009 at 12:47:41AM +0100, Markus Rosenstihl wrote:

You are definitely right with your suggestion not to use 'from foo import *'
It took me a while to realise that the gain of explicite namespace was
more than the cost of a few characters, but I definitely stand by this.

> I always use
> import numpy as N

We try to encourage using 'import numpy as np'. I wasn't so exited to
push this convention on every body, but itis true that it is really
convenient to be able to edit a file, or copy-paste code, without
worrying how numpy is imported.

Cheers,

Gaël


More information about the Numpy-discussion mailing list