[Numpy-discussion] Index Parsing redo

Sebastian Berg sebastian at sipsolutions.net
Thu Apr 18 15:33:32 EDT 2013


so I ignored trying to redo MapIter (likely it is lobotomized at this
time though). But actually got a working new index parsing (still needs
cleanup, etc.).  Also some of the fast paths are not yet put back. For
most pure integer indices it got a bit slower, if it actually gets too
much one could re-add such special cases I guess...

If anyone wants to take a look, it is here:


The tests run through fine with the exception of the matrix item setting
[1] and changes in errors. Certainly many errors still need to be made
indexing specific.

If anyone is interested in messing with it, give me a ping for direct
access. Polishing such a thing up (if deemed right) is a lot of work and
I am not sure I will find the time soon.



[1] That is because subclass item setting (for non-fancy, non-scalar
result and non-single integer indices) is really

tmp = subclass.view(np.ndarray)
tmp[index] = values`

which needs to be put back in. The whole matrix indexing business
probably needs some extra functionality in the core to get right I

More information about the NumPy-Discussion mailing list