[Numpy-discussion] packaging scipy (was Re: Simple financial functions for NumPy)

Jarrod Millman millman@berkeley....
Wed Apr 9 17:57:41 CDT 2008


On Wed, Apr 9, 2008 at 11:27 AM, Christopher Barker
<Chris.Barker@noaa.gov> wrote:
>  except that the beginner, nor anyone else, should ever use "import *"
>  anyway!

+1

>  "Namespaces are one honking great idea -- let's do more of those!"
>
>  That's "more", not "fewer"

Agreed.

>  I really don't get the reluctance -- EVERY major package I've worked
>  with has moved AWAY from "import *" (numpy, wxPython, matplotlib, ...).
>  We should never, never, recommend it to beginners. Period. And it would
>  be very nice to use a standard. I use "import numpy as N", but would be
>  quite happy to use "np" or "nx", or anything else short that becomes a
>  standard.

Absolutely.  Let's please standardize on:
import numpy as np
import scipy as sp

See:
http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines
http://svn.scipy.org/svn/numpy/trunk/numpy/doc/example.py

It is slowly becoming a standard and I would strongly encourage
everyone to follow it.

Thanks for bringing this up!

-- 
Jarrod Millman
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
phone: 510.643.4014
http://cirl.berkeley.edu/


More information about the Numpy-discussion mailing list