(self, axis)
| 4083 | ] |
| 4084 | ) |
| 4085 | def test_keepdims_out(self, axis): |
| 4086 | d = np.ones((3, 5, 7, 11)) |
| 4087 | if axis is None: |
| 4088 | shape_out = (1,) * d.ndim |
| 4089 | else: |
| 4090 | axis_norm = normalize_axis_tuple(axis, d.ndim) |
| 4091 | shape_out = tuple( |
| 4092 | 1 if i in axis_norm else d.shape[i] for i in range(d.ndim)) |
| 4093 | out = np.empty(shape_out) |
| 4094 | result = np.median(d, axis=axis, keepdims=True, out=out) |
| 4095 | assert result is out |
| 4096 | assert_equal(result.shape, shape_out) |
| 4097 | |
| 4098 | @pytest.mark.parametrize("dtype", ["m8[s]"]) |
| 4099 | @pytest.mark.parametrize("pos", [0, 23, 10]) |
nothing calls this directly
no test coverage detected