[Scipy-tickets] [SciPy] #1493: scipy.stats.invnorm.ppf fails

SciPy Trac scipy-tickets@scipy....
Fri Aug 12 03:13:02 CDT 2011


#1493: scipy.stats.invnorm.ppf fails
--------------------+-------------------------------------------------------
 Reporter:  mw263   |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  0.9.0      
 Keywords:          |  
--------------------+-------------------------------------------------------
 >>> scipy.stats.invnorm.ppf(0.8455, 7.24000019602, scale=2.51913630166)
 25.187834528234678

 but

 scipy.stats.invnorm.ppf(0.8465, 7.24000019602, scale=2.51913630166)
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/local/lib/python2.7/site-
 packages/scipy/stats/distributions.py", line 1363, in ppf
     place(output,cond,self._ppf(*goodargs)*scale + loc)
   File "/usr/local/lib/python2.7/site-
 packages/scipy/stats/distributions.py", line 1063, in _ppf
     return self.vecfunc(q,*args)
   File "/usr/local/lib/python2.7/site-
 packages/numpy/lib/function_base.py", line 1832, in __call__
     _res = array(self.ufunc(*newargs),copy=False,
   File "/usr/local/lib/python2.7/site-
 packages/scipy/stats/distributions.py", line 1009, in _ppf_single_call
     return optimize.brentq(self._ppf_to_solve, self.xa, self.xb,
 args=(q,)+args, xtol=self.xtol)
   File "/usr/local/lib/python2.7/site-packages/scipy/optimize/zeros.py",
 line 364, in brentq
     r = _zeros._brentq(f,a,b,xtol,maxiter,args,full_output,disp)
 ValueError: f(a) and f(b) must have different signs

 System
 Python 2.7.1 (r271:86832, Dec 14 2010, 16:46:08)
 [GCC 4.2.1 (Apple Inc. build 5664)] on darwin

 >>> scipy.__version__
 '0.9.0rc5'

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


More information about the Scipy-tickets mailing list