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

ENH: stats: Implement _sf and _isf for hypsecant. #18783

Merged
merged 1 commit into from Jul 11, 2023

Conversation

WarrenWeckesser
Copy link
Member

No description provided.

@WarrenWeckesser WarrenWeckesser added scipy.stats enhancement A new feature or improvement labels Jun 28, 2023
@WarrenWeckesser
Copy link
Member Author

The one test failure is unrelated to this PR.

@mdhaber
Copy link
Contributor

mdhaber commented Jun 29, 2023

I can take a look at this, but would you review/merge #18714?

Copy link
Contributor

@mdhaber mdhaber left a comment

Choose a reason for hiding this comment

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

Given the symmetry/evenness of sech, these look correct compared to the CDF/ISF. Looks like we lose a bit when the argument of isf is very close to one due to the finite precision of np.pi and the sensitivity of tan near pi/2 (float(mp.tan(mp.pi*q/2.0)) is quite different from float(mp.tan(mp.pi*q/2.0)) with q close to 1), but seems like the right trade to make if we're not going to branch.

@WarrenWeckesser I would still appreciate a response to #18783 (comment).

@mdhaber mdhaber merged commit da584a3 into scipy:main Jul 11, 2023
23 of 24 checks passed
@WarrenWeckesser WarrenWeckesser deleted the hypsecant-sf-isf branch July 12, 2023 02:19
@WarrenWeckesser WarrenWeckesser added this to the 1.12.0 milestone Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or improvement scipy.stats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants