Perl's @foo[3,7,1,-1] ?

Scott David Daniels Scott.Daniels at Acm.Org
Wed Jun 17 09:26:31 EDT 2009

Jean-Michel Pichavant wrote:
> On Wed, Jun 17, 2009 at 04:14, Steven D'Aprano wrote:
>>> What's np.arange?
>> import numpy as np
> Perfect example of why renaming namespaces should be done only when 
> absolutely required, that is, almost never.
> Jean-Michel

Actually, "np." is quite commonly used in the numpy community,
so it is a bit of a "term of art".  Since you can often use
several numpy elements in an expression, brevity is appreciated,
and at least they've stopped assuming "from numpy import *" in
their documents.  Unfortunately, if you work in a numpy world long
enough, you'll forget that not everyone uses numpy.

--Scott David Daniels
Scott.Daniels at Acm.Org

More information about the Python-list mailing list