[Numpy-svn] r4970 - trunk/numpy/linalg/tests

numpy-svn@scip... numpy-svn@scip...
Sun Apr 6 21:07:14 CDT 2008


Author: peridot
Date: 2008-04-06 21:07:04 -0500 (Sun, 06 Apr 2008)
New Revision: 4970

Modified:
   trunk/numpy/linalg/tests/test_linalg.py
Log:
Test that matrix_power behaves correctly for boolean matrices.


Modified: trunk/numpy/linalg/tests/test_linalg.py
===================================================================
--- trunk/numpy/linalg/tests/test_linalg.py	2008-04-06 21:59:28 UTC (rev 4969)
+++ trunk/numpy/linalg/tests/test_linalg.py	2008-04-07 02:07:04 UTC (rev 4970)
@@ -148,6 +148,10 @@
         self.assertRaises(numpy.linalg.linalg.LinAlgError,
                 lambda: matrix_power(self.noninv,-1))
 
+class TestBoolPower(NumpyTestCase):
+    def check_square(self):
+        A = array([[True,False],[True,True]])
+        assert_equal(matrix_power(A,2),A)
 
 if __name__ == '__main__':
     NumpyTest().run()



More information about the Numpy-svn mailing list