(self, kth_dtype)
| 2760 | |
| 2761 | @pytest.mark.parametrize("kth_dtype", np.typecodes["AllInteger"]) |
| 2762 | def test_partition_empty_array(self, kth_dtype): |
| 2763 | # check axis handling for multidimensional empty arrays |
| 2764 | kth = np.array(0, dtype=kth_dtype)[()] |
| 2765 | a = np.array([]) |
| 2766 | a.shape = (3, 2, 1, 0) |
| 2767 | for axis in range(-a.ndim, a.ndim): |
| 2768 | msg = 'test empty array partition with axis={0}'.format(axis) |
| 2769 | assert_equal(np.partition(a, kth, axis=axis), a, msg) |
| 2770 | msg = 'test empty array partition with axis=None' |
| 2771 | assert_equal(np.partition(a, kth, axis=None), a.ravel(), msg) |
| 2772 | |
| 2773 | @pytest.mark.parametrize("kth_dtype", np.typecodes["AllInteger"]) |
| 2774 | def test_argpartition_empty_array(self, kth_dtype): |
nothing calls this directly
no test coverage detected