[Scipy-tickets] [SciPy] #1782: RuntimeWarning encountered at first p_roots or ps_roots call.

SciPy Trac scipy-tickets@scipy....
Fri Nov 30 15:52:48 CST 2012


#1782: RuntimeWarning encountered at first p_roots or ps_roots call.
----------------------------+-----------------------------------------------
 Reporter:  sylvain.corlay  |       Owner:  pv         
     Type:  defect          |      Status:  new        
 Priority:  normal          |   Milestone:  Unscheduled
Component:  scipy.special   |     Version:  0.11.0     
 Keywords:  orthogonal      |  
----------------------------+-----------------------------------------------
 The first call of p_roots (or ps_roots) would yield a RuntimeWarning.
 (invalid value encountered in divide). Way to reproduce:

 {{{
 from scipy.special.orthogonal import p_roots
 p_roots(3)
 }}}

 This yields:
 {{{
 orthogonal.py:246: RuntimeWarning: invalid value encountered in divide
   an_Js = lambda k: np.where(k==0,q/(p+1.0),(2.0*k*(k+p)+q*(p-1.0)) /
 ((2.0*k+p+1.0)*(2*k+p-1.0)))
 }}}

 I experienced this bug with

 Scipy 0.11.0
 Python 2.7.3

 Thanks!

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


More information about the Scipy-tickets mailing list