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

Charles R Harris charlesr.harris@gmail....
Mon Nov 16 11:50:12 CST 2009


On Mon, Nov 16, 2009 at 10:43 AM, Christopher Barker
<Chris.Barker@noaa.gov>wrote:

> 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.
>
>
It's all python.


> 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?
>
>
That's what I ended up doing. You still need to do "import numpy.polynomial"
to get to them, they aren't automatically imported into the numpy namespace.


> 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.
>
>
Been thinking about it. Division/multiplication can get hard, but a more
restricted set of operations -- division/multiplication by x -- would cover
most of the common uses.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091116/0fd0c02a/attachment.html 


More information about the NumPy-Discussion mailing list