(self, kth_dtype)
| 3358 | |
| 3359 | @pytest.mark.parametrize("kth_dtype", np.typecodes["AllInteger"]) |
| 3360 | def test_argpartition_empty_array(self, kth_dtype): |
| 3361 | # check axis handling for multidimensional empty arrays |
| 3362 | kth = np.array(0, dtype=kth_dtype)[()] |
| 3363 | a = np.array([]).reshape((3, 2, 1, 0)) |
| 3364 | for axis in range(-a.ndim, a.ndim): |
| 3365 | msg = f'test empty array argpartition with axis={axis}' |
| 3366 | assert_equal(np.partition(a, kth, axis=axis), |
| 3367 | np.zeros_like(a, dtype=np.intp), msg) |
| 3368 | msg = 'test empty array argpartition with axis=None' |
| 3369 | assert_equal(np.partition(a, kth, axis=None), |
| 3370 | np.zeros_like(a.ravel(), dtype=np.intp), msg) |
| 3371 | |
| 3372 | def test_partition(self): |
| 3373 | d = np.arange(10) |
nothing calls this directly
no test coverage detected