(self, method)
| 4075 | |
| 4076 | @pytest.mark.parametrize("method", quantile_methods) |
| 4077 | def test_quantile_monotonic(self, method): |
| 4078 | # GH 14685 |
| 4079 | # test that the return value of quantile is monotonic if p0 is ordered |
| 4080 | # Also tests that the boundary values are not mishandled. |
| 4081 | p0 = np.linspace(0, 1, 101) |
| 4082 | quantile = np.quantile(np.array([0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 1, 1, 9, 9, 9, |
| 4083 | 8, 8, 7]) * 0.1, p0, method=method) |
| 4084 | assert_equal(np.sort(quantile), quantile) |
| 4085 | |
| 4086 | # Also test one where the number of data points is clearly divisible: |
| 4087 | quantile = np.quantile([0., 1., 2., 3.], p0, method=method) |
| 4088 | assert_equal(np.sort(quantile), quantile) |
| 4089 | |
| 4090 | @hypothesis.given( |
| 4091 | arr=arrays(dtype=np.float64, |
nothing calls this directly
no test coverage detected