I'm trying to return an nested list, however running into some conversion error. Below is small piece of code for reproduction of error.
from numba import njit, prange
@njit("ListType(ListType(ListType(int32)))(int32, int32)", fastmath = True, parallel = True, cache = True)
def test(x, y):
a = []
for i in prange(10):
b = []
for j in range(4):
c = []
for k in range(5):
c.append(k)
b.append(c)
a.append(b)
return a

I try to avoid using empty lists with numba, mainly because an empty list cannot be typed. Check out
nb.typeof([])I am not sure whether your output can be preallocated but you could consider arrays. There would also be massive performance benefits. Here is an attempt:
That said, you might indeed need lists for your application, in which case this answer might not be of much use.