[Numpy-tickets] [NumPy] #556: polydiv function gets the wrong answer!!

NumPy numpy-tickets@scipy....
Tue Jul 24 13:39:40 CDT 2007


#556: polydiv function gets the wrong answer!!
--------------------------+-------------------------------------------------
 Reporter:  subheight640  |        Owner:  somebody
     Type:  defect        |       Status:  closed  
 Priority:  normal        |    Milestone:          
Component:  numpy.lib     |      Version:  none    
 Severity:  normal        |   Resolution:  wontfix 
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by rkern):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 Python doesn't automatically upcast integers to floats upon division. If
 you pass floating point values to polydiv(), you will get the correct
 answers (just one floating point value in the input list is enough to tell
 numpy to make a floating point array from it):

 {{{
 In [2]: polydiv([7.,6,5,4,3,2,1],[6.,5,4,3,2,1])
 Out[2]:
 (array([ 1.16666667,  0.02777778]),
  array([ 0.19444444,  0.38888889,  0.58333333,  0.77777778,  0.97222222]))
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/556#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list