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

SciPy Trac scipy-tickets@scipy....
Fri Oct 22 12:19:53 CDT 2010

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

Comment(by josefpktd):

 I saw your new comment after writing the following. The change looks good.
 Could you also check the other methods ?

 Here is a failing case for logsf, whether it fails in a distribution with
 empty goodargs seems to depend on whether or how vectorize is used which
 depends on the availability of methods and which (generic) method is
 called. But I don't have an overview anymore.

 In any case, all methods should be protected by "if any(cond)":

 >>> stats.logser.logsf(np.array([1, 2, 3]),np.arange(10,15)[:,None])
 Traceback (most recent call last):
     return self._cdfvec(k,*args)
   File "C:\Programs\Python25\lib\site-
 packages\numpy\lib\function_base.py", line 1803, in __call__
 IndexError: invalid index

 Another point I forgot while trying out this, this has to be tested with a
 new interpreter each time, because of the "weird" stateful behavior
 somewhere in the distribution implementation. (So, I'm not sure whether
 things worked because I didn't restart my interpreter or because there are
 no other bugs.)

Ticket URL: <http://projects.scipy.org/scipy/ticket/1291#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