(self)
| 373 | # Tests for mr_, the equivalent of r_ for masked arrays. |
| 374 | |
| 375 | def test_1d(self): |
| 376 | # Tests mr_ on 1D arrays. |
| 377 | assert_array_equal(mr_[1, 2, 3, 4, 5, 6], array([1, 2, 3, 4, 5, 6])) |
| 378 | b = ones(5) |
| 379 | m = [1, 0, 0, 0, 0] |
| 380 | d = masked_array(b, mask=m) |
| 381 | c = mr_[d, 0, 0, d] |
| 382 | assert_(isinstance(c, MaskedArray)) |
| 383 | assert_array_equal(c, [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1]) |
| 384 | assert_array_equal(c.mask, mr_[m, 0, 0, m]) |
| 385 | |
| 386 | def test_2d(self): |
| 387 | # Tests mr_ on 2D arrays. |
nothing calls this directly
no test coverage detected