[Scipy-svn] r5135 - trunk/scipy/stats

scipy-svn@scip... scipy-svn@scip...
Sun Nov 16 08:36:38 CST 2008


Author: josef
Date: 2008-11-16 08:36:35 -0600 (Sun, 16 Nov 2008)
New Revision: 5135

Modified:
   trunk/scipy/stats/distributions.py
Log:
skip nbinom.sf and calculate it indirectly, fix for n<1, tickets #583, #697

Modified: trunk/scipy/stats/distributions.py
===================================================================
--- trunk/scipy/stats/distributions.py	2008-11-16 13:43:00 UTC (rev 5134)
+++ trunk/scipy/stats/distributions.py	2008-11-16 14:36:35 UTC (rev 5135)
@@ -4011,7 +4011,8 @@
     def _cdf(self, x, n, pr):
         k = floor(x)
         return special.betainc(n, k+1, pr)
-    def _sf(self, x, n, pr):
+    def _sf_skip(self, x, n, pr):
+        #skip because special.nbdtrc doesn't work for 0<n<1
         k = floor(x)
         return special.nbdtrc(k,n,pr)
     def _ppf(self, q, n, pr):



More information about the Scipy-svn mailing list