(self, q, axis)
| 3420 | ] |
| 3421 | ) |
| 3422 | def test_keepdims_out(self, q, axis): |
| 3423 | d = np.ones((3, 5, 7, 11)) |
| 3424 | if axis is None: |
| 3425 | shape_out = (1,) * d.ndim |
| 3426 | else: |
| 3427 | axis_norm = normalize_axis_tuple(axis, d.ndim) |
| 3428 | shape_out = tuple( |
| 3429 | 1 if i in axis_norm else d.shape[i] for i in range(d.ndim)) |
| 3430 | shape_out = np.shape(q) + shape_out |
| 3431 | |
| 3432 | out = np.empty(shape_out) |
| 3433 | result = np.percentile(d, q, axis=axis, keepdims=True, out=out) |
| 3434 | assert result is out |
| 3435 | assert_equal(result.shape, shape_out) |
| 3436 | |
| 3437 | def test_out(self): |
| 3438 | o = np.zeros((4,)) |
nothing calls this directly
no test coverage detected