(self, kth_dtype)
| 3347 | |
| 3348 | @pytest.mark.parametrize("kth_dtype", np.typecodes["AllInteger"]) |
| 3349 | def test_partition_empty_array(self, kth_dtype): |
| 3350 | # check axis handling for multidimensional empty arrays |
| 3351 | kth = np.array(0, dtype=kth_dtype)[()] |
| 3352 | a = np.array([]).reshape((3, 2, 1, 0)) |
| 3353 | for axis in range(-a.ndim, a.ndim): |
| 3354 | msg = f'test empty array partition with axis={axis}' |
| 3355 | assert_equal(np.partition(a, kth, axis=axis), a, msg) |
| 3356 | msg = 'test empty array partition with axis=None' |
| 3357 | assert_equal(np.partition(a, kth, axis=None), a.ravel(), msg) |
| 3358 | |
| 3359 | @pytest.mark.parametrize("kth_dtype", np.typecodes["AllInteger"]) |
| 3360 | def test_argpartition_empty_array(self, kth_dtype): |
nothing calls this directly
no test coverage detected