Skip to content

gh-150318: Fix quantiles(method='exclusive') returning unsorted cut points for duplicate floats#150326

Open
edvilme wants to merge 2 commits into
python:mainfrom
edvilme:statistics-quantiles-duplicate
Open

gh-150318: Fix quantiles(method='exclusive') returning unsorted cut points for duplicate floats#150326
edvilme wants to merge 2 commits into
python:mainfrom
edvilme:statistics-quantiles-duplicate

Conversation

@edvilme
Copy link
Copy Markdown
Contributor

@edvilme edvilme commented May 23, 2026

When all data points are identical floats, the interpolation formula in the exclusive branch can produce results off by 1 ULP due to floating point rounding. Hence, adjacent cut points differ and the returned list violates the non-decreasing rule.

This short-circuits the interpolation, returning the data value directly instead.

…rted cut points for duplicate floats

When all data points are identical floats, the interpolation formula in the exclusive branch can produce results off by 1 ULP due to floating point rounding. Hence, adjacent cut points differ and the returned list violates the non-decreasing rule.

This short-circuits the interpolation, returning the data value directly instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant