ENH: Increase np.atleast_2d and np.atleast_3d performance#30880
ENH: Increase np.atleast_2d and np.atleast_3d performance#30880benediktjohannes wants to merge 6 commits intonumpy:mainfrom
Conversation
Credits to: @eendebakpt Contributed by Benedikt Johannes
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
I've got the results for the benchmark! 👍 Script: (Credits to @eendebakpt for the great script👍) Results: Old ( New ( |
|
Test failure is unrealted (can't install build environment) |
|
Should I write release notes 2.5 for this change, @ngoldbaum? Or is this done by the team? I only know this from CPython. |
|
Because it says:
And the change is kind of user facing in my opinion because the performance is changed and users might notice this (and the latest news document also includes performance improvements). |
|
minor performance improvements like this don't need a release note |
|
All checks pass, do I need to use any command like /merge? |
|
So without the unrelated one |
|
Please be patient, I added the milestone so this won't get lost before the next major release this summer. |
|
Thank you! |
|
But one question: Is everything finished that I got to do? So can I just wait for the summer without doing anything for this? |
|
Maybe sooner, this PR has only been open for a day or so. The project doesn't move terribly quickly and people do code review as their time and interest permits. I was also planning to look closer at this at some point. Usually we like to leave PRs that make performance improvements and add new features open for at least a few days. |
|
Also, IMO this PR shouldn't be backported, so in practice very few people will be able to use this until NumPy 2.5 comes out this summer. |
|
Ah, okay, thank you very much for the Information! Don’t feel stressed about it! |
This pull request is a features #26130 by @eendebakpt (credits to him for the great work 👍 ) and should improve the performance of
np.atleast_2dandnp.atleast_3d.I've not tested the changes, but it seems quite obvious to me from looking at the code that these should be (at least in most cases) positive (and in general more positive than negative, but I'm not one hundred percent sure, so please correct me if I'm mistaken, thanks).
Credits to: @eendebakpt
Contributed by Benedikt Johannes