Hi Varun,

thanks for taking care and adopting my patch.  now it got accepted
upstream and I wanted to mention that they refactored few other
comparisons -- so it might be wise for Debian to adopt that patch as
well (attaching).

Cheers

On Fri, 20 Apr 2012, Debian Bug Tracking System wrote:

> Your message dated Fri, 20 Apr 2012 07:32:47 +0000
> with message-id <e1sl8kl-0001gh...@franck.debian.org>
> and subject line Bug#653948: fixed in python-scipy 0.10.1+dfsg1-2
> has caused the Debian Bug report #653948,
> regarding cephes_smirnov never returns on mips
> to be marked as done.

> This means that you claim that the problem has been dealt with.
> If this is not the case it is now your responsibility to reopen the
> Bug report if necessary, and/or fix the problem forthwith.

> (NB: If you are a system administrator and have no idea what this
> message is talking about, this may indicate a serious mail system
> misconfiguration somewhere. Please contact ow...@bugs.debian.org
> immediately.)
-- 
Yaroslav O. Halchenko
Postdoctoral Fellow,   Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        
From 2858f452b8083f1eca4499889e6b43942c2eda03 Mon Sep 17 00:00:00 2001
From: Pauli Virtanen <p...@iki.fi>
Date: Fri, 11 May 2012 23:03:18 +0200
Subject: [PATCH 3/3] BUG: special: nan safety in smirnovi & kolmogi

---
 scipy/special/cephes/kolmogorov.c |    4 ++--
 scipy/special/tests/test_basic.py |    3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/scipy/special/cephes/kolmogorov.c b/scipy/special/cephes/kolmogorov.c
index d78e0ae..86ae669 100644
--- a/scipy/special/cephes/kolmogorov.c
+++ b/scipy/special/cephes/kolmogorov.c
@@ -117,7 +117,7 @@ smirnovi (n, p)
   double e, t, dpde;
   int iterations;
 
-  if (p <= 0.0 || p > 1.0)
+  if (!(p > 0.0 && p <= 1.0))
     {
       mtherr ("smirnovi", DOMAIN);
       return (NPY_NAN);
@@ -165,7 +165,7 @@ kolmogi (p)
   double y, t, dpdy;
   int iterations;
 
-  if (p <= 0.0 || p > 1.0)
+  if (!(p > 0.0 && p <= 1.0))
     {
       mtherr ("kolmogi", DOMAIN);
       return (NPY_NAN);
diff --git a/scipy/special/tests/test_basic.py b/scipy/special/tests/test_basic.py
index 4553ecb..5adceef 100644
--- a/scipy/special/tests/test_basic.py
+++ b/scipy/special/tests/test_basic.py
@@ -268,6 +268,7 @@ class TestCephes(TestCase):
 
     def test_kolmogi(self):
         assert_equal(cephes.kolmogi(1),0.0)
+        assert_(np.isnan(cephes.kolmogi(np.nan)))
     def test_kolmogorov(self):
         assert_equal(cephes.kolmogorov(0),1.0)
 
@@ -428,9 +429,11 @@ class TestCephes(TestCase):
         assert_equal(cephes.sindg(90),1.0)
     def test_smirnov(self):
         assert_equal(cephes.smirnov(1,.1),0.9)
+        assert_(np.isnan(cephes.smirnov(1,np.nan)))
     def test_smirnovi(self):
         assert_almost_equal(cephes.smirnov(1,cephes.smirnovi(1,0.4)),0.4)
         assert_almost_equal(cephes.smirnov(1,cephes.smirnovi(1,0.6)),0.6)
+        assert_(np.isnan(cephes.smirnovi(1,np.nan)))
 
     def test_spence(self):
         assert_equal(cephes.spence(1),0.0)
-- 
1.7.9.1

Attachment: signature.asc
Description: Digital signature

Reply via email to