[Numpy-discussion] Adding the new polynomial/chebyshev modules.

Christopher Barker Chris.Barker@noaa....
Mon Nov 16 11:43:43 CST 2009


Charles R Harris wrote:
> I would like some advise on the best way to add the new functions. I've 
> added a new package polynomial, and that package contains four new 
> modules: chebyshev, polynomial, polytemplate, polyutils.

This seems to belong more in scipy than numpy, but I'll leave that to 
others to decide.

> whether or not to include all of the functions in these packages in the 
> __init__.py, or to just import the modules.

Are any of them compiled code? I've been very frustrated when I can't 
use some pure python stuff in scipy because broken compiled fortran 
extensions are getting imported that I don't even need.

If that isn't an issue, and the polynomial package would end up with 
only a handful of names, then I say import them all. Another way to ask 
this: would there by ANY names in the polynomial package if you don't 
import the modules?

If there is compiled code, the import could fail gracefully, and then 
you could still pull it all in.

OTOH, what this does is bring stuff into memory unnecessarily, and also 
brings it into stand-alone bundles (py2exe, py2app, etc). So if these 
modules are not small, then it's probably better to have to import them 
explicitly.

Also -- do you foresee many more polynomial types in the future? I know 
I'd like to see Hermite.


-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov


More information about the NumPy-Discussion mailing list