BUG: Undo result type change of quantile/percentile but keep q precision#30601
BUG: Undo result type change of quantile/percentile but keep q precision#30601charris merged 2 commits intonumpy:mainfrom
q precision#30601Conversation
Defer cast to input type to the end of the computation by passing through the `weak_q` information. This fixes numpygh-30586, but I am not sure it is great to backport. Although, compared to the other PR it should just align the nan-functions fully and otherwise revert anything that isn't just a precision fix.
|
(One tiny effect here is that previously, for arrays of longdouble, i.e. high precision, the |
q precision
q precisionq precision
|
I will put this before 2.4.1. |
mhvk
left a comment
There was a problem hiding this comment.
This looks good. The direct test for in (int, float) make me wonder, though, if this isn't something that can be done with _array_converter? But you probably considered that, since you added that... Anyway, if that doesn't work for some reason, or is just too big an overhaul for this fixup, fine to go with this.
|
Thanks Sebastian. |
BUG: Undo result type change of quantile/percentile but keep q precision (#30601)
|
Yeah, I considered it and thought it doesn't matter. |
|
Dang it, I forgot to undo one line of code and the tests didn't notice! |
Defer cast to input type to the end of the computation by passing through the
weak_qinformation.This fixes gh-30586, but I am not sure it is great to backport. Although, compared to the other PR it should just align the nan-functions fully and otherwise revert anything that isn't just a precision fix.
If we don't want to backport this, I would be tempted to just revert the original PR for 2.5, TBH.
This still needs tests, althoughit passes all tests added in gh-29105.