(self)
| 3636 | assert_raises(TypeError, np.quantile, arr_c, 0.5) |
| 3637 | |
| 3638 | def test_no_p_overwrite(self): |
| 3639 | # this is worth retesting, because quantile does not make a copy |
| 3640 | p0 = np.array([0, 0.75, 0.25, 0.5, 1.0]) |
| 3641 | p = p0.copy() |
| 3642 | np.quantile(np.arange(100.), p, method="midpoint") |
| 3643 | assert_array_equal(p, p0) |
| 3644 | |
| 3645 | p0 = p0.tolist() |
| 3646 | p = p.tolist() |
| 3647 | np.quantile(np.arange(100.), p, method="midpoint") |
| 3648 | assert_array_equal(p, p0) |
| 3649 | |
| 3650 | @pytest.mark.parametrize("dtype", np.typecodes["AllInteger"]) |
| 3651 | def test_quantile_preserve_int_type(self, dtype): |
nothing calls this directly
no test coverage detected