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

David Huard david.huard@gmail....
Mon Apr 7 09:51:22 CDT 2008


2008/4/4, Joe Harrington <jh@physics.ucf.edu>:
>
> import numpy      as N
> import numpy.math as N.M
> import numpy.trig as N.T
> import numpy.stat as N.S



I don't think the issue is whether to put everything in the base namespace
// everything in individual namespace, but rather to find an optimal and
intuitive mix between the two. For instance, the io functions would be
easier to find by typing np.io.loadtxt than by sifting through the 500+
items of the base namespace. The stats functions could equally well be in a
separate namespace, given that the most used are implemented as array
methods. I think this would allow numpy to grow more gracefully.

As for the financial functions, being specific to a discipline, I think they
rather belongs with scipy. The numpy namespace will quickly become a mess if
we add np.geology, np.biology, np.material, etc.

Of course, this raises the problem of distributing scipy, and here is a
suggestion:

Change the structure of scipy so that it looks like the scikits:

scipy/
        sparse/
        cluster/
        financial/
        ...
        fftpack/
                   setup.py
                   scipy/
                            __init__.py
                            fftpack/


The advantage is that each subpackage can be installed independently of the
others. For distribution, we could lump all the pure python or easy to
compile packages into scipy.common, and distribute the other packages such
as sparse and fftpack independently. My feeling is that such a lighter
structure would encourage projects with large code base to join the scipy
community. It would also allow folks with 56k modems to download only what
they need.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080407/ed5e9a16/attachment.html 


More information about the Numpy-discussion mailing list