()
| 387 | |
| 388 | |
| 389 | def test_mask_indices(): |
| 390 | # simple test without offset |
| 391 | iu = mask_indices(3, np.triu) |
| 392 | a = np.arange(9).reshape(3, 3) |
| 393 | assert_array_equal(a[iu], array([0, 1, 2, 4, 5, 8])) |
| 394 | # Now with an offset |
| 395 | iu1 = mask_indices(3, np.triu, 1) |
| 396 | assert_array_equal(a[iu1], array([1, 2, 5])) |
| 397 | |
| 398 | |
| 399 | def test_tril_indices(): |
nothing calls this directly
no test coverage detected