[Numpy-discussion] non-integer index misfeature?
d.warde.farley at gmail.com
Wed Dec 12 16:09:56 EST 2012
On Wed, Dec 12, 2012 at 3:20 PM, Ralf Gommers <ralf.gommers at gmail.com> wrote:
> For numpy indexing this may not be appropriate though; checking every index
> value used could slow things down and/or be quite disruptive.
For array fancy indices, a dtype check on the entire array would
suffice. For lists and scalars, I doubt it'd be substantial amount of
overhead compared to the overhead that already exists (for lists, I'm
not totally sure whether these are coerced to arrays first -- if they
are, the dtype check need only be performed once after that). At any
rate, a benchmark of any proposed solution is in order.
More information about the NumPy-Discussion