BUG: np.take
cannot deal with 64-bit indices on 32-bit platforms
#25607
Labels
np.take
cannot deal with 64-bit indices on 32-bit platforms
#25607
This looks like a bug, because regular indexing is able to deal with the exact same situation. Running these test cases, the ones where the second argument has
int64
dtype fail in a 32-bit Linux Docker container:Full tracebacks:
It's expected that
np.take
has parity here with indexing, and acceptsint64
dtype input also on 32-bit platforms. I came across this in SciPy code, where trying to replace indexing withtake
usage failed unexpectedly. It was code like this:There,
idx
is always 64-bit, and this is a fairly common way of generating indices, so it's cumbersome to have to castidx
tointp
dtype.The text was updated successfully, but these errors were encountered: