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

getitem/setitem putmask hooks #23

Open
tdimitri opened this issue Oct 5, 2020 · 2 comments
Open

getitem/setitem putmask hooks #23

tdimitri opened this issue Oct 5, 2020 · 2 comments
Labels
numpy changes fixing this requires support from numpy

Comments

@tdimitri
Copy link
Collaborator

tdimitri commented Oct 5, 2020

boolean and fancy index masking related routines can be sped up and are used very often.
Be nice if we could hook these routines.

@mattip
Copy link
Collaborator

mattip commented Oct 6, 2020

We may have to hack the tp_getitem, tp_setitem to do this.

@teoliphant
Copy link
Collaborator

Yes, to replace "mask" and fancy-indexing, generically, we would likely need to replace the Python-level functions. There might be a way to speed things up a bit by replacing functions on the "PyArray_ArrFuncs *f" member of the PyArray_Descr ("dtype") object. There are functions there that also need to be swapped out to speed up sorting, and such. See lines near 443 to 553 of ndarraytypes.h (though I may have an old version of the NumPy code checked-out).

@jack-pappas jack-pappas added the numpy changes fixing this requires support from numpy label Dec 16, 2020
@mattip mattip removed their assignment Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
numpy changes fixing this requires support from numpy
Projects
None yet
Development

No branches or pull requests

4 participants