(self)
| 1545 | assert_equal(test.mask, control.mask) |
| 1546 | |
| 1547 | def test_ediff1d_tobegin_toend(self): |
| 1548 | # Test ediff1d w/ to_begin and to_end |
| 1549 | x = masked_array(np.arange(5), mask=[1, 0, 0, 0, 1]) |
| 1550 | test = ediff1d(x, to_end=masked, to_begin=masked) |
| 1551 | control = array([0, 1, 1, 1, 4, 0], mask=[1, 1, 0, 0, 1, 1]) |
| 1552 | assert_equal(test, control) |
| 1553 | assert_equal(test.filled(0), control.filled(0)) |
| 1554 | assert_equal(test.mask, control.mask) |
| 1555 | # |
| 1556 | test = ediff1d(x, to_end=[1, 2, 3], to_begin=masked) |
| 1557 | control = array([0, 1, 1, 1, 4, 1, 2, 3], |
| 1558 | mask=[1, 1, 0, 0, 1, 0, 0, 0]) |
| 1559 | assert_equal(test, control) |
| 1560 | assert_equal(test.filled(0), control.filled(0)) |
| 1561 | assert_equal(test.mask, control.mask) |
| 1562 | |
| 1563 | def test_ediff1d_ndarray(self): |
| 1564 | # Test ediff1d w/ a ndarray |
nothing calls this directly
no test coverage detected