(self)
| 37 | assert_raises(ValueError, matrix, "invalid") |
| 38 | |
| 39 | def test_bmat_nondefault_str(self): |
| 40 | A = np.array([[1, 2], [3, 4]]) |
| 41 | B = np.array([[5, 6], [7, 8]]) |
| 42 | Aresult = np.array([[1, 2, 1, 2], |
| 43 | [3, 4, 3, 4], |
| 44 | [1, 2, 1, 2], |
| 45 | [3, 4, 3, 4]]) |
| 46 | mixresult = np.array([[1, 2, 5, 6], |
| 47 | [3, 4, 7, 8], |
| 48 | [5, 6, 1, 2], |
| 49 | [7, 8, 3, 4]]) |
| 50 | assert_(np.all(bmat("A,A;A,A") == Aresult)) |
| 51 | assert_(np.all(bmat("A,A;A,A", ldict={'A':B}) == Aresult)) |
| 52 | assert_raises(TypeError, bmat, "A,A;A,A", gdict={'A':B}) |
| 53 | assert_( |
| 54 | np.all(bmat("A,A;A,A", ldict={'A':A}, gdict={'A':B}) == Aresult)) |
| 55 | b2 = bmat("A,B;C,D", ldict={'A':A,'B':B}, gdict={'C':B,'D':A}) |
| 56 | assert_(np.all(b2 == mixresult)) |
| 57 | |
| 58 | |
| 59 | class TestProperties: |
nothing calls this directly
no test coverage detected