[Numpy-discussion] Index Parsing redo

Sebastian Berg sebastian@sipsolutions....
Thu Apr 18 14:33:32 CDT 2013


Hey,

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:

https://github.com/seberg/numpy/compare/rewrite-index-parser

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.

Regards,

Sebastian

[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
guess.



More information about the NumPy-Discussion mailing list