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

Andreas Klöckner lists@informa.tiker....
Mon Apr 7 15:55:59 CDT 2008


On Montag 07 April 2008, Stéfan van der Walt wrote:
> I wouldn't exactly call 494 functions "just enough namespace clutter";
>  I'd much prefer to have a clean api to work with.

Not to bicker, but...

>>> import numpy
>>> len(dir(numpy))
494
>>> numpy.__version__
'1.0.4'
>>> funcs = [s for s in dir(numpy) if type(getattr(numpy, s)) in 
[type(numpy.array), type(numpy.who)]]
>>> len(funcs)
251
>>> classes = [s for s in dir(numpy) if type(getattr(numpy, s)) == 
type(numpy.ndarray)]
>>> len(classes)
88
>>> ufuncs = [s for s in dir(numpy) if type(getattr(numpy, s)) == 
type(numpy.sin)]
>>> len(ufuncs)
69
>>> 

(and, therefore, another 69 names of "fluff")

I honestly don't see much of a problem.

The only things that maybe should not have been added to numpy.* are the 
polynomial functions and the convolution windows, conceptually. But in my 
book that's not big enough to even think of breaking people's code for.

Andreas
Proud Member of the Flat Earth Society
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080407/1dcd0864/attachment.bin 


More information about the Numpy-discussion mailing list