Skip to content

gh-158631: Avoid overflow in logistic and sigmoid KDE kernels - #158632

Closed
mikamikasuki wants to merge 1 commit into
python:mainfrom
mikamikasuki:fix/158631-stable-kde-kernels
Closed

mikamikasuki wants to merge 1 commit into
python:mainfrom
mikamikasuki:fix/158631-stable-kde-kernels

Conversation

@mikamikasuki

@mikamikasuki mikamikasuki commented Oct 3, 2026 •

Copy link
Copy Markdown

Fixes #158631.

The logistic and sigmoid KDE kernels now use stable exponential formulas for their PDFs and CDFs, avoiding overflow for finite query points far from the data.

Validation:

  • The 4-test TestKDE class passed against the current source and tests under Python 3.14 with compatibility shims for math helpers and test support added on CPython main.
  • git diff --check passed.
  • The full CPython build and test suite were not run locally.

@python-cla-bot

python-cla-bot Bot commented Oct 3, 2026

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@picnixz

picnixz commented Oct 3, 2026

Copy link
Copy Markdown
Member

Please wait until we discuss this on the issue.

@picnixz picnixz closed this Oct 3, 2026
@picnixz

picnixz commented Oct 3, 2026

Copy link
Copy Markdown
Member

In addition the OP already stated their intent to make a PR.

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.

statistics.kde: logistic and sigmoid kernels raise OverflowError for points far from the data

2 participants