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

MAINT: stats.kendalltau: avoid overflow #18193

Merged
merged 1 commit into from
Mar 24, 2023
Merged

MAINT: stats.kendalltau: avoid overflow #18193

merged 1 commit into from
Mar 24, 2023

Conversation

mdhaber
Copy link
Contributor

@mdhaber mdhaber commented Mar 24, 2023

Reference issue

Closes gh-18139

What does this implement/fix?

An overflow was reported in scipy.stats.kendalltau for a very large sample with many ties. The statistic was unaffected, and the p-value was affected only slightly. This PR avoids the overflow.

@mdhaber mdhaber added scipy.stats maintenance Items related to regular maintenance tasks labels Mar 24, 2023
Copy link
Member

@tupui tupui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Matt

@tupui tupui merged commit 9562a4a into scipy:main Mar 24, 2023
@tupui tupui added this to the 1.11.0 milestone Mar 24, 2023
@dennisdeh
Copy link
Contributor

Great, thanks mdhaber for fixing the problem

doronbehar added a commit to doronbehar/scipy that referenced this pull request Mar 27, 2023
* main: (52 commits)
  ENH: stats.vonmises.fit: treat case in which location likelihood equation has no solution(scipy#18190)
  MAINT: stats.kendalltau: avoid overflow (scipy#18193)
  DOC: Optimize: Fix for side bar rendering on top of Hessian (scipy#18189)
  MAINT: optimize.linprog: fix bound checks for integrality > 1 (scipy#18160)
  MAINT: Windows distutils cdist/pdist shims (scipy#18169)
  BUG: interpolate: add x-y length validation for `make_smoothing_spline`. (scipy#18188)
  ENH: Added `_sf` method for anglit distribution (scipy#17832) (scipy#18178)
  DOC: Fixed missing curly bracket in scipy.css
  DOC: Improving wording and docs for legacy directive
  DOC: Move legacy directive to not be first in the file
  DOC: Legacy directive custom styling
  DOC: Add optional argument to Legacy directive
  DOC: Ignore legacy directive in refguide_check
  DOC: Documenting the usage of the legacy directive
  DOC: Add legacy directive for documentation
  MAINT: stats.ecdf: store number at risk just before events (scipy#18187)
  DOC: cite pip issue about multiple `--config-settings` (scipy#18174)
  DOC: update links for ARPACK to point to ARPACK-NG (scipy#18173)
  MAINT: stats.logistic.fit: simplify
  MAINT: optimize.root_scalar: return gracefully when callable returns NaN (scipy#18172)
  ...
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.

BUG: Overflow in 'new' implementation of scipy.stats.kendalltau
3 participants