[Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication
Sun Feb 14 01:40:05 CST 2010
On Sat, Feb 13, 2010 at 11:10 PM, Fernando Perez <firstname.lastname@example.org>wrote:
> On Sat, Feb 13, 2010 at 10:32 PM, Charles R Harris
> <email@example.com> wrote:
> > Note that ipython calls __repr__ to print the output. __repr__ is
> > to provide a string that can be used to recreate the object, a pretty
> > printed version of __repr__ doesn't provide that. Also, an array or list
> IPython calls repr because that's the convention the standard python
> shell uses, and I decided long ago to follow suit.
> > polynomials, having pretty printed entries looks pretty ugly with the
> > newlines and all -- try it with Poly1d. I was also thinking that someone
> > might want to provide a better display at some point, drawing on a
> > for instance. And what happens when the degree gets up over 100, which is
> > quite reasonable with the Cheybshev polynomials?
> sympy has pretty remarkable pretty-printing support, perhaps some of
> that could be reused. Just a thought.
Curious: how is sympy at deducing recursion relations and/or index
functions? Reason: my first thought about Chuck's high-degree issue was
that in such cases perhaps PrettyPoly (or __pretty__) could attempt to use
summation notation (of course, this would only be useful when the
coefficients are formulaic functions of the index, but hey, it's something).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion