[Scipy-svn] r4831 - trunk/scipy/stats/tests

scipy-svn@scip... scipy-svn@scip...
Sat Oct 25 04:13:38 CDT 2008


Author: cdavid
Date: 2008-10-25 04:13:34 -0500 (Sat, 25 Oct 2008)
New Revision: 4831

Modified:
   trunk/scipy/stats/tests/test_stats.py
Log:
Add regression test for #760.

Modified: trunk/scipy/stats/tests/test_stats.py
===================================================================
--- trunk/scipy/stats/tests/test_stats.py	2008-10-25 09:13:05 UTC (rev 4830)
+++ trunk/scipy/stats/tests/test_stats.py	2008-10-25 09:13:34 UTC (rev 4831)
@@ -693,6 +693,11 @@
         assert_equal(stats.median(a2),2.5)
         assert_equal(stats.median(a3),3.5)
 
+    def test_axis(self):
+        a1 = np.array([[3,4,5], [10,-3,-5]])
+        assert_equal(stats.median(a1), np.array([6.5, 0.5, 0.]))
+        assert_equal(stats.median(a1, axis=-1), np.array([4., -3]))
+
 class TestMode(TestCase):
     def test_basic(self):
         data1 = [3,5,1,10,23,3,2,6,8,6,10,6]



More information about the Scipy-svn mailing list