[NumPy-Tickets] [NumPy] #2059: Numpy float plus/times poly1d gives array
NumPy Trac
numpy-tickets@scipy....
Mon Feb 20 17:49:04 CST 2012
#2059: Numpy float plus/times poly1d gives array
------------------------+---------------------------------------------------
Reporter: ezander | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: 1.5.1
Keywords: |
------------------------+---------------------------------------------------
Comment(by charris):
It tries to cast it to an array. To avoid that you need to define the
attribute
{{{
__array_priority__ = 1000
}}}
But I suggest just using the Polynomial class instead of poly1d. We should
really deprecate the latter but it will take some work to remove all the
current uses. Note that Polynomial only takes coefficients and the
coefficients go from low to high degree. If you really need from roots,
use Polynomial.fromroots(...)
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2059#comment:4>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list