Wed Aug 25 09:00:37 CDT 2010
On Tue, Aug 24, 2010 at 10:58 PM, Travis Oliphant <firstname.lastname@example.org>wrote:
> On Aug 23, 2010, at 10:30 PM, Charles R Harris wrote:
> > Hi All,
> > I've gone ahead and implemented the Laguerre and Hermite (H and He)
> polynomials, but at this point I'm loath to add them to numpy as the
> polynomial space is getting crowded. Scipy looks like a better spot to put
> these but there is already the orthogonal module there. OTOH, the orthogonal
> module uses poly1d for the representation and that is numerical poison. The
> versions I have use the direct series representations in the given basis for
> +, -, x, /, integration, and differentiation as well as doing direct
> conversions between domains and basis without going through ordinary power
> series, so that is a plus. They are also usable with mpmath for extended
> precision but at the price of sticking to python for the implementation, so
> they could be speeded up by restricting to doubles and complex. They don't
> supply the points and weights for Gauss integration, I tend to think those
> things belong under integration, but they could be included.
> Don't let the orthogonal module stop you from adding the polynomials to
> SciPy. They would fit very nicely. It would be nice to deprecate the
> current orthogonal polynomials over time as more numerically accurate
> implementations of them were included.
> You could put them in a module like:
> or another name. You could even replace the laguerre and hermite
> functions in special.orthogonal assuming the behaviors are similar. But, to
> be safe, it would probably be best to put them in a different module and
> deprecate the old names.
> Is your implementation along the same lines as the Polynomial and Chebyshev
classes? In that case I would find it odd to split them between numpy and
scipy, and perhaps a little arbitrary to have Chebyshev in numpy while
Laguerre/Hermite (and possibly others in the future?) go into scipy. And a
practical concern may be that if you happen to find bugs or want to make
incompatible changes you have to deal with two release cycles.
Another option to consider would be to stick the low-level functions in a
separate namespace, and just have the main classes in numpy.polynomial. Then
your concern about the crowded namespace is gone, and you could add your new
code to numpy.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion