[Numpy-discussion] problems multiplying poly1d with number from array

Mark Bakker markbak@gmail....
Mon Oct 27 15:01:47 CDT 2008


Hello list -

I can multiply a poly1d instance with a number, but when I multiply with a
number from an array, the order matters. That seems a bug:

>>> a = array([2])
>>> p = poly1d([1,2])
>>> print 2*p  # Works

2 x + 4
>>> print a[0]*p  # Doesn't work, returns an array
[2 4]
>>> print p*a[0]  # Works

2 x + 4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20081027/5cec47a9/attachment.html 


More information about the Numpy-discussion mailing list