(self)
| 806 | assert_array_equal(unique(inp, axis=1), unique(inp_arr, axis=1), msg) |
| 807 | |
| 808 | def test_unique_axis(self): |
| 809 | types = [] |
| 810 | types.extend(np.typecodes['AllInteger']) |
| 811 | types.extend(np.typecodes['AllFloat']) |
| 812 | types.append('datetime64[D]') |
| 813 | types.append('timedelta64[D]') |
| 814 | types.append([('a', int), ('b', int)]) |
| 815 | types.append([('a', int), ('b', float)]) |
| 816 | |
| 817 | for dtype in types: |
| 818 | self._run_axis_tests(dtype) |
| 819 | |
| 820 | msg = 'Non-bitwise-equal booleans test failed' |
| 821 | data = np.arange(10, dtype=np.uint8).reshape(-1, 2).view(bool) |
| 822 | result = np.array([[False, True], [True, True]], dtype=bool) |
| 823 | assert_array_equal(unique(data, axis=0), result, msg) |
| 824 | |
| 825 | msg = 'Negative zero equality test failed' |
| 826 | data = np.array([[-0.0, 0.0], [0.0, -0.0], [-0.0, 0.0], [0.0, -0.0]]) |
| 827 | result = np.array([[-0.0, 0.0]]) |
| 828 | assert_array_equal(unique(data, axis=0), result, msg) |
| 829 | |
| 830 | @pytest.mark.parametrize("axis", [0, -1]) |
| 831 | def test_unique_1d_with_axis(self, axis): |
nothing calls this directly
no test coverage detected