Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: stats.Normal: bump tolerance on test of logcdf #22276

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

mdhaber
Copy link
Contributor

@mdhaber mdhaber commented Jan 8, 2025

Reference issue

e.g. gh-22274

What does this implement/fix?

There is a test failing in main with the latest release of hypothesis. It looks like it is able to find a little region where quadrature is less accurate than usual:

import numpy as np
from scipy import stats
X = stats.Normal(mu=-0.044622861356271804, sigma=1.234783885368829)
X.logcdf(-0.84)       - X.logcdf(-0.84, method='quadrature')        # np.float64(0.0)
X.logcdf(-0.84693408) - X.logcdf(-0.84693408, method='quadrature')  # np.float64(1.1598066906870486e-07)
X.logcdf(-0.85)       - X.logcdf(-0.85, method='quadrature')        # np.float64(0.0)

So this bumps the tolerance slightly.

@mdhaber mdhaber added scipy.stats maintenance Items related to regular maintenance tasks labels Jan 8, 2025
@lucascolley lucascolley added this to the 1.16.0 milestone Jan 8, 2025
@mdhaber mdhaber requested a review from steppi January 8, 2025 06:01

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[skip ci]

Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>
@dschmitz89 dschmitz89 merged commit 9166b6f into scipy:main Jan 8, 2025
@dschmitz89
Copy link
Contributor

Thanks Matt.

@tylerjereddy tylerjereddy added the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Jan 10, 2025
@tylerjereddy tylerjereddy modified the milestones: 1.16.0, 1.15.1 Jan 10, 2025
tylerjereddy pushed a commit to tylerjereddy/scipy that referenced this pull request Jan 10, 2025
* TST: stats.Normal: bump tolerance on test of logcdf

* Update scipy/stats/tests/test_continuous.py

[skip ci]

Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>

---------

Co-authored-by: Daniel Schmitz <40656107+dschmitz89@users.noreply.github.com>
@tylerjereddy tylerjereddy mentioned this pull request Jan 10, 2025
2 tasks
@tylerjereddy tylerjereddy removed the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.stats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants