[Numpy-discussion] Making NumPy accessible to everyone (or no-one) (was Numpy-discussion Digest, Vol 19, Issue 44)

Jarrod Millman millman@berkeley....
Fri Apr 11 03:04:05 CDT 2008


On Thu, Apr 10, 2008 at 10:17 AM, Lou Pecora <lou_boog2000@yahoo.com> wrote:
>  Yes, I use np= number of points, too.  But you all
>  might want to use something else.  That's the point of
>  the flexibility of import ... as

I would recommend against using np as a variable name.  Variable names
should be short and informative.  I would much rather see something
like "num_points".

>  Trying to lock in namespaces as np or N or whatever is
>  a BAD idea.  Allow the flexibility.  You can admonish
>  against from ... import * for newbies and then tell
>  them to use from ... import actual function names (as
>  mentioned above).  But locking people into a standard,
>  even an informal one is, as someone else said, acting
>  a bit too much like accountants.  Stop, please!

Coding standards and conventions in a large, collaborative codebase
are essential.  If you want to contribute to NumPy or SciPy you will
have to conform to these conventions.  In your own private code or
private project do whatever you want.

-- 
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