[Numpy-discussion] Indexing API

Nathaniel Smith njs at pobox.com
Thu Jul 19 04:50:22 EDT 2012


So the underlying problem with the controversial inplace_increment
PR[1] is that currently, there's actually nothing in the public numpy
API that exposes the workings of numpy indexing. The only thing you
can do with a numpy index is call ndarray.__getattr__ or __setattr__.
This is a pretty obvious gap, given how fundamental an operation
indexing is in numpy (and how difficult to emulate). So how can we
expose something that fixes it? Make PyArrayMapIterObject part of the
public API? Something else?

-n

[1] https://github.com/numpy/numpy/pull/326



More information about the NumPy-Discussion mailing list