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

SciPy Trac scipy-tickets@scipy....
Tue Dec 4 15:08:56 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      |  
----------------------------+-----------------------------------------------

Comment(by rgommers):

 Two options to fix this:

 1. silence all errors with {{{seterr(all='ignore')}}} for each call to
 {{{np.where}}}.

 2. Replace the lambda definitions using {{{np.where}}} with normal
 function definitions that do something like
 {{{
 def func_name(k):
     ix = k == 0
     out[ix] = where_expr_1
     out[~ix] = where_expr_2
     return out
 }}}

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


More information about the Scipy-tickets mailing list