I'm using Numba library in Python3.
A function's parameter is a 2d array.
I set Numba jit decorators to list[list[int]], but show TypeError: 'type' object is not subscriptable after run code.
I using print(numba.typeof(matrix)) to detect parameter type, it return list(reflected list(int32)) type.
But even if I change decorators to list[list[numba.int32]] , not working too.
Code:
from numba import jit
size = 3
matrix = [[0, 1, 2], [4, 5, 6], [7, 8, 9]]
@jit(list[list[int]])
def test(jitmatrix):
_total = 0
for i in range(size):
for j in range(size):
_total += jitmatrix[j][i]
test(matrix)
Have any idea to set 2d array on jit decorator without numpy library ?
Or it must to use numpy library?