(self, q, axis)
| 3781 | ] |
| 3782 | ) |
| 3783 | def test_keepdims_out(self, q, axis): |
| 3784 | d = np.ones((3, 5, 7, 11)) |
| 3785 | if axis is None: |
| 3786 | shape_out = (1,) * d.ndim |
| 3787 | else: |
| 3788 | axis_norm = normalize_axis_tuple(axis, d.ndim) |
| 3789 | shape_out = tuple( |
| 3790 | 1 if i in axis_norm else d.shape[i] for i in range(d.ndim)) |
| 3791 | shape_out = np.shape(q) + shape_out |
| 3792 | |
| 3793 | out = np.empty(shape_out) |
| 3794 | result = np.percentile(d, q, axis=axis, keepdims=True, out=out) |
| 3795 | assert result is out |
| 3796 | assert_equal(result.shape, shape_out) |
| 3797 | |
| 3798 | def test_out(self): |
| 3799 | o = np.zeros((4,)) |
nothing calls this directly
no test coverage detected