Hi everyone,
I'm currently trying to write a numba function for solving my array
equations. Everything works fine except that I at one point have to index a
1D numpy array either with a 1D or a 2D numpy index array. I tried checking
for this by using
to get the standard advanced indexing function for 1D index arrays and
otherwise using slicing to get a 1D view of the 2D index array to again be
able to do advanced indexing.
But when trying to pass a 2D index array to my function I always get the
error:
*numba.errors.InternalError: unsupported array index type array(int32, 2d,
C) in [array(int32, 2d, C)]*And when trying to pass a 1D index array to my
function I always get this error:
*numba.errors.InternalError: cannot index array(int32, 1d, C) with 2
indices: (slice<a:b>, int64)*My short example code snippet looks like this:
Unluckily this does not work, since the compiler seems to check if all
parts of the function work for the given pidx array, right?
This code snippet is part of a much larger function which is called in many
million iterations, but the arrays used for this function are fixed and
constant for all iterations and will be passed to the larger function with
each call.
How can I still use indexing for both kinds of arrays? Writing separate
functions is not preferred, but currently my way to make it work. Is there
any other way?
And is there a time schedule for the implementation of general 2D advanced
indexing?
Thanks in advance!
Sincerely,
Johannes
--
You received this message because you are subscribed to the Google Groups "Numba Public Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numba-users+unsubscribe@continuum.io.
To post to this group, send email to numba...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/numba-users/1aabebc3-8cf3-4530-95f4-fdd0457bb338%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to numba-users...@continuum.io.