API: Remove The MapIter API from public #25138
Merged
mattip merged 4 commits intonumpy:mainfrom Nov 15, 2023
Merged
Conversation
This API is very slow to use compared to normal advanced indexing (which reaches deep into the much richer internals). Making this fast is difficult and the only known users is Theano: * While probably still in use Theano is end-of-life for a long time. * The use-case in Theano would be better served with `ufunc.at` or direct advanced indexing use probably (even if that requires wrapping into NumPy arrays). Because it will be vastly faster normally. So remove it (make it private) to allow making the ABI of it not be a strange mix for backwards compatibility.
mattip
approved these changes
Nov 15, 2023
| /* | ||
| * Store the information needed for fancy-indexing over an array. The | ||
| * fields are slightly unordered to keep consec, dataptr and subspace | ||
| * where they were originally. |
Member
There was a problem hiding this comment.
Is there any need to reorder the fields?
Member
Author
There was a problem hiding this comment.
Hmmm, will have a look. I am not quite sure I found everything that can be cleaned out also.
Member
|
Thanks @seberg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This API is very slow to use compared to normal advanced indexing
(which reaches deep into the much richer internals).
Making this fast is difficult and the only known users is Theano:
ufunc.atordirect advanced indexing use probably (even if that requires
wrapping into NumPy arrays). Because it will be vastly faster
normally.
So remove it (make it private) to allow making the ABI of it not be
a strange mix for backwards compatibility.
Revival of gh-24274, because I now have another reason. Bumping maxdims to 64 cannot be done for the mapiter if it is public. So just remove it, because nobody uses it (as in the other PR, the only public user and likely the reason it was made public initially gave a thumbs-up).
Otherwise, we would either not support 64dims in all advanced indexing paths or require odd hacks to keep practically unused API from working.