(self)
| 461 | # Tests for mr_, the equivalent of r_ for masked arrays. |
| 462 | |
| 463 | def test_1d(self): |
| 464 | # Tests mr_ on 1D arrays. |
| 465 | assert_array_equal(mr_[1, 2, 3, 4, 5, 6], array([1, 2, 3, 4, 5, 6])) |
| 466 | b = ones(5) |
| 467 | m = [1, 0, 0, 0, 0] |
| 468 | d = masked_array(b, mask=m) |
| 469 | c = mr_[d, 0, 0, d] |
| 470 | assert_(isinstance(c, MaskedArray)) |
| 471 | assert_array_equal(c, [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1]) |
| 472 | assert_array_equal(c.mask, mr_[m, 0, 0, m]) |
| 473 | |
| 474 | def test_2d(self): |
| 475 | # Tests mr_ on 2D arrays. |
nothing calls this directly
no test coverage detected