@jit(nopython=True)
def index_arr(ixes, points):
return points[ixes]
points = np.random.uniform(-1, 1, (2048, 3)).astype(np.float32)
index_arr([1, 2, 3], points)
returns:
TypeError: unsupported array index type reflected list(int64)<iv=None> in [reflected list(int64)<iv=None>]
Anyways around this other than casting the list as np.array?
The problem is I have a large dictionary with tuples as keys and lists of indices as values. I use this indicies to slice from a numpy array and create a new Typed Dict for passing into a numba jit function.
Unfrotunatelly, looping through this dictionary to get the needed slices takes a very long time since the dictionary is large so I wanted to do this inside the jit function but having a hard time achieving so.
Thanks guys