(self)
| 571 | assert_array_equal(result, [True] + [False] * 4) |
| 572 | |
| 573 | def test_union1d(self): |
| 574 | a = np.array([5, 4, 7, 1, 2]) |
| 575 | b = np.array([2, 4, 3, 3, 2, 1, 5]) |
| 576 | |
| 577 | ec = np.array([1, 2, 3, 4, 5, 7]) |
| 578 | c = union1d(a, b) |
| 579 | assert_array_equal(c, ec) |
| 580 | |
| 581 | # Tests gh-10340, arguments to union1d should be |
| 582 | # flattened if they are not already 1D |
| 583 | x = np.array([[0, 1, 2], [3, 4, 5]]) |
| 584 | y = np.array([0, 1, 2, 3, 4]) |
| 585 | ez = np.array([0, 1, 2, 3, 4, 5]) |
| 586 | z = union1d(x, y) |
| 587 | assert_array_equal(z, ez) |
| 588 | |
| 589 | assert_array_equal([], union1d([], [])) |
| 590 | |
| 591 | def test_setdiff1d(self): |
| 592 | a = np.array([6, 5, 4, 7, 1, 2, 7, 4]) |
nothing calls this directly
no test coverage detected