()
| 405 | |
| 406 | |
| 407 | def test_mask_indices(): |
| 408 | # simple test without offset |
| 409 | iu = mask_indices(3, np.triu) |
| 410 | a = np.arange(9).reshape(3, 3) |
| 411 | assert_array_equal(a[iu], array([0, 1, 2, 4, 5, 8])) |
| 412 | # Now with an offset |
| 413 | iu1 = mask_indices(3, np.triu, 1) |
| 414 | assert_array_equal(a[iu1], array([1, 2, 5])) |
| 415 | |
| 416 | |
| 417 | def test_tril_indices(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…