[Scipy-tickets] [SciPy] #1838: Divide by zero in pchip

SciPy Trac scipy-tickets@scipy....
Mon Feb 4 17:42:47 CST 2013

#1838: Divide by zero in pchip
 Reporter:  pv                 |       Owner:  pv         
     Type:  defect             |      Status:  new        
 Priority:  normal             |   Milestone:  Unscheduled
Component:  scipy.interpolate  |     Version:  0.11.0     
 Keywords:                     |  
 The following line in scipy.interpolate.polyint.pchip raises divide by
 zero warnings:
         whmean = 1.0/(w1+w2)*(w1/mk[1:] + w2/mk[:-1])
 The infs/nans so generated are filtered out by applying a boolean
 condition mask, but the mask could be applied before division to avoid the
 warnings altogether.

Ticket URL: <http://projects.scipy.org/scipy/ticket/1838>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list