(self)
| 1658 | assert_array_equal([], in1d([], [], invert=True)) |
| 1659 | |
| 1660 | def test_union1d(self): |
| 1661 | # Test union1d |
| 1662 | a = array([1, 2, 5, 7, 5, -1], mask=[0, 0, 0, 0, 0, 1]) |
| 1663 | b = array([1, 2, 3, 4, 5, -1], mask=[0, 0, 0, 0, 0, 1]) |
| 1664 | test = union1d(a, b) |
| 1665 | control = array([1, 2, 3, 4, 5, 7, -1], mask=[0, 0, 0, 0, 0, 0, 1]) |
| 1666 | assert_equal(test, control) |
| 1667 | |
| 1668 | # Tests gh-10340, arguments to union1d should be |
| 1669 | # flattened if they are not already 1D |
| 1670 | x = array([[0, 1, 2], [3, 4, 5]], mask=[[0, 0, 0], [0, 0, 1]]) |
| 1671 | y = array([0, 1, 2, 3, 4], mask=[0, 0, 0, 0, 1]) |
| 1672 | ez = array([0, 1, 2, 3, 4, 5], mask=[0, 0, 0, 0, 0, 1]) |
| 1673 | z = union1d(x, y) |
| 1674 | assert_equal(z, ez) |
| 1675 | # |
| 1676 | assert_array_equal([], union1d([], [])) |
| 1677 | |
| 1678 | def test_setdiff1d(self): |
| 1679 | # Test setdiff1d |
nothing calls this directly
no test coverage detected