[Numpy-discussion] Idea: fractional polynomial class

Michael S. Gilbert michael.s.gilbert@gmail....
Fri Apr 24 11:52:33 CDT 2009


Hello,

I've been working with numpy's poly1d class recently, and it would be
very useful to me if the class worked with fractions instead of
floats (since I'm encountering quantities that often mostly cancel out,
which lead to instabilities in my algorithms; hence it would be
useful to use fractions that don't lose precision). Since python 2.6
introduced a "fractions" class, it should be fairly straightforward to
implement/reimplement the polynomial class with support for fractions.

I'm curious as to whether there would be any interest from the project
on this and whether you all would be open to patches/code contributions.

Best Regards,
Mike


More information about the Numpy-discussion mailing list