diff options
author | aarchiba <peridot.faceted@gmail.com> | 2008-04-07 02:07:04 +0000 |
---|---|---|
committer | aarchiba <peridot.faceted@gmail.com> | 2008-04-07 02:07:04 +0000 |
commit | 5b82c49ff6b1d5fdb47835fe886a25bf5a324962 (patch) | |
tree | 4e1a65951875a7aeb3d3b7aa30f9b33256fef5a7 /numpy/linalg/tests | |
parent | 2058775cdf40c5ae5c4ac2c3f44a37fee7c6bc99 (diff) | |
download | numpy-5b82c49ff6b1d5fdb47835fe886a25bf5a324962.tar.gz |
Test that matrix_power behaves correctly for boolean matrices.
Diffstat (limited to 'numpy/linalg/tests')
-rw-r--r-- | numpy/linalg/tests/test_linalg.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py index 0ecd8e234..5321ae7c5 100644 --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -148,6 +148,10 @@ class TestMatrixPower(ParametricTestCase): 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() |