-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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.ttest_1samp: add array-API support #20545
Conversation
Nice! Would it make sense to post a basic benchmark in PR descriptions, to show things work with similar or improved speed compared to using NumPy? E.g., using CuPy if GPU is supported, and PyTorch CPU tensors if only other CPU implementations are supported? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
took a look on my phone, may have missed something but looks pretty good!
I am without a GPU for a while now, and I think all of these PRs should run CuPy through the test suite before going in. |
Like |
Addressed the comments and posted timing comparison at the top: NumPy performance is unchanged but PyTorch is considerably faster. One of the Windows tests stopped like:
last time. Not seeing this in other PRs so let's watch out for it. |
Very nice. Even if PyTorch had not been faster this change has value - but almost 2x faster out of the box is great to see. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All LGTM. I'm confident that test coverage hasn't reduced and that there aren't any spooky stats
changes that have gone over my head. Thanks Matt!
Reference issue
gh-20544
What does this implement/fix?
This adds array-API support to
scipy.stats.ttest_1samp
.Additional Information