[Scipy-tickets] [SciPy] #1291: stats.discrete distributions hypergeom.sf exception

SciPy Trac scipy-tickets@scipy....
Fri Jan 14 18:34:11 CST 2011


#1291: stats.discrete distributions hypergeom.sf exception
-------------------------+--------------------------------------------------
 Reporter:  josefpktd    |       Owner:  somebody
     Type:  defect       |      Status:  apply   
 Priority:  normal       |   Milestone:  0.9.0   
Component:  scipy.stats  |     Version:  0.7.0   
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by josefpktd):

 the stats.method still has the same problem

 {{{
 >>> from scipy import stats

 >>> stats.wrapcauchy.stats(1.)
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
 "C:\Josef\_progs\Subversion\scipy_trunk_g09\dist\scipy-0.10.0.dev7027.win
 32\Programs\Python25\Lib\site-packages\scipy\stats\distributions.py", line
 1477,
  in stats
     mu = self._munp(1.0,*goodargs)
   File
 "C:\Josef\_progs\Subversion\scipy_trunk_g09\dist\scipy-0.10.0.dev7027.win
 32\Programs\Python25\Lib\site-packages\scipy\stats\distributions.py", line
 1076,
  in _munp
     return self.generic_moment(n,*args)
   File "C:\Programs\Python25\Lib\site-
 packages\numpy\lib\function_base.py", line
  1812, in __call__
     newargs.append(asarray(arg).flat[0])
 IndexError: invalid index
 }}}

 after calling with a valid, stats returns nan (correctly)
 {{{
 >>> stats.wrapcauchy.stats(0.5)
 (array(3.1415926535897931), array(5.6188302395565017))

 >>> stats.wrapcauchy.stats(1.)
 (array(1.#QNAN), array(1.#QNAN))
 }}}

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


More information about the Scipy-tickets mailing list