[Scipy-svn] r5560 - trunk/scipy/signal/tests

scipy-svn@scip... scipy-svn@scip...
Wed Feb 18 12:03:21 CST 2009


Author: stefan
Date: 2009-02-18 12:03:08 -0600 (Wed, 18 Feb 2009)
New Revision: 5560

Modified:
   trunk/scipy/signal/tests/test_signaltools.py
Log:
Add very basic tests for filtfilt and decimate.

Modified: trunk/scipy/signal/tests/test_signaltools.py
===================================================================
--- trunk/scipy/signal/tests/test_signaltools.py	2009-02-18 18:02:23 UTC (rev 5559)
+++ trunk/scipy/signal/tests/test_signaltools.py	2009-02-18 18:03:08 UTC (rev 5560)
@@ -220,5 +220,15 @@
             for j in range(x.shape[1]):
                 assert_array_almost_equal(y[i, j], lfilter(b, a, x[i, j]))
 
+class TestFiltFilt:
+    def test_basic(self):
+        out = signal.filtfilt([1,2,3], [1,2,3], np.arange(12))
+        assert_equal(out, arange(12))
+
+class TestDecimate:
+    def test_basic(self):
+        x = np.arange(6)
+        assert_array_equal(signal.decimate(x, 2, n=1).round(), x[::2])
+
 if __name__ == "__main__":
     run_module_suite()



More information about the Scipy-svn mailing list