(self)
| 1721 | assert_array_equal([], in1d([], [], invert=True)) |
| 1722 | |
| 1723 | def test_union1d(self): |
| 1724 | # Test union1d |
| 1725 | a = array([1, 2, 5, 7, 5, -1], mask=[0, 0, 0, 0, 0, 1]) |
| 1726 | b = array([1, 2, 3, 4, 5, -1], mask=[0, 0, 0, 0, 0, 1]) |
| 1727 | test = union1d(a, b) |
| 1728 | control = array([1, 2, 3, 4, 5, 7, -1], mask=[0, 0, 0, 0, 0, 0, 1]) |
| 1729 | assert_equal(test, control) |
| 1730 | |
| 1731 | # Tests gh-10340, arguments to union1d should be |
| 1732 | # flattened if they are not already 1D |
| 1733 | x = array([[0, 1, 2], [3, 4, 5]], mask=[[0, 0, 0], [0, 0, 1]]) |
| 1734 | y = array([0, 1, 2, 3, 4], mask=[0, 0, 0, 0, 1]) |
| 1735 | ez = array([0, 1, 2, 3, 4, 5], mask=[0, 0, 0, 0, 0, 1]) |
| 1736 | z = union1d(x, y) |
| 1737 | assert_equal(z, ez) |
| 1738 | # |
| 1739 | assert_array_equal([], union1d([], [])) |
| 1740 | |
| 1741 | def test_setdiff1d(self): |
| 1742 | # Test setdiff1d |
nothing calls this directly
no test coverage detected