-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
API: Remove The MapIter API from public #25138
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
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.
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.
LGTM, pretty straightforward.
/* | ||
* 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. |
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.
Is there any need to reorder the fields?
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.
Hmmm, will have a look. I am not quite sure I found everything that can be cleaned out also.
Thanks @seberg |
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.at
ordirect 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.