[SciPy-user] poly1d mul bug

Ryan Krauss ryanlists@gmail....
Sat Jun 27 08:12:35 CDT 2009


I am multiplying a pol1d by a floating point number and getting different
output types depending on whether I multiply on the right or the left:

ipdb> (zero**2)*poly1d([1, 2*zeta_p*pole, pole**2, 0])
array([    208.84082913,    2296.32485094,  100997.6419477 ,       0.
])
ipdb> poly1d([1, 2*zeta_p*pole, pole**2, 0])*(zero**2)
poly1d([    208.84082913,    2296.32485094,  100997.6419477 ,
0.        ])
ipdb> zeta_p
0.25
ipdb> pole
21.991148575128552
ipdb> zero
14.451326206513047
<type 'numpy.float64'>
ipdb> type(pole)
<type 'numpy.float64'>
ipdb> type(zeta_p)
<type 'numpy.float64'>


Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20090627/7c7b788d/attachment.html 


More information about the SciPy-user mailing list