(self, axis)
| 4728 | ] |
| 4729 | ) |
| 4730 | def test_keepdims_out(self, axis): |
| 4731 | d = np.ones((3, 5, 7, 11)) |
| 4732 | if axis is None: |
| 4733 | shape_out = (1,) * d.ndim |
| 4734 | else: |
| 4735 | axis_norm = normalize_axis_tuple(axis, d.ndim) |
| 4736 | shape_out = tuple( |
| 4737 | 1 if i in axis_norm else d.shape[i] for i in range(d.ndim)) |
| 4738 | out = np.empty(shape_out) |
| 4739 | result = np.median(d, axis=axis, keepdims=True, out=out) |
| 4740 | assert result is out |
| 4741 | assert_equal(result.shape, shape_out) |
| 4742 | |
| 4743 | @pytest.mark.parametrize("dtype", ["m8[s]"]) |
| 4744 | @pytest.mark.parametrize("pos", [0, 23, 10]) |
nothing calls this directly
no test coverage detected