[Scipy-tickets] [SciPy] #1358: stats distributions discrete: problems at infinite upper bound

SciPy Trac scipy-tickets@scipy....
Fri Jan 14 15:41:09 CST 2011


#1358: stats distributions discrete: problems at infinite upper bound
-------------------------+--------------------------------------------------
 Reporter:  josefpktd    |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  normal       |   Milestone:  0.10.0  
Component:  scipy.stats  |     Version:  0.8.0   
 Keywords:               |  
-------------------------+--------------------------------------------------
 {{{

 >>> stats.poisson.sf(stats.poisson.b, 2)
 nan
 >>> stats.poisson.cdf(stats.poisson.b, 2)
 1.0

 >>> stats.poisson.sf(1000, 2)
 0.0
 >>> stats.poisson.sf(10000, 2)
 0.0
 }}}

 logser has another problem

 {{{
 >>> stats.logser.cdf(stats.logser.b, 0.5)
 1.0
 >>> stats.logser.sf(stats.logser.b, 0.5)

 Traceback (most recent call last):
   File "<pyshell#268>", line 1, in <module>
     stats.logser.sf(stats.logser.b, 0.5)
   File
 "C:\Josef\_progs\Subversion\scipy_trunk_g09\dist\scipy-0.10.0.dev7027.win32\Programs\Python25\Lib
 \site-packages\scipy\stats\distributions.py", line 5190, in sf
     place(output,cond,self._sf(*goodargs))
   File
 "C:\Josef\_progs\Subversion\scipy_trunk_g09\dist\scipy-0.10.0.dev7027.win32\Programs\Python25\Lib
 \site-packages\scipy\stats\distributions.py", line 4960, in _sf
     return 1.0-self._cdf(x,*args)
   File
 "C:\Josef\_progs\Subversion\scipy_trunk_g09\dist\scipy-0.10.0.dev7027.win32\Programs\Python25\Lib
 \site-packages\scipy\stats\distributions.py", line 4954, in _cdf
     return self._cdfvec(k,*args)
   File "C:\Programs\Python25\Lib\site-
 packages\numpy\lib\function_base.py", line 1813, in __call__
     theout = self.thefunc(*newargs)
   File
 "C:\Josef\_progs\Subversion\scipy_trunk_g09\dist\scipy-0.10.0.dev7027.win32\Programs\Python25\Lib
 \site-packages\scipy\stats\distributions.py", line 4949, in _cdfsingle
     m = arange(int(self.a),k+1)
 ValueError: Maximum allowed size exceeded

 >>> stats.logser.sf(1000, 0.5)
 1.1102230246251565e-016
 }}}

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


More information about the Scipy-tickets mailing list