I have input data like this
data = [['foo1','bar1'],['foo2','bar2','fooz2','baz2'],['foo3']]
Ie. list of lists where in each sublist there is a different number of strings.
Is it somehow possible to send this data into an @njit function and run a double loop to make operations on this input data?
For example this
@njit def myfunc(lst): a = 0 for i in range(len(lst)): for j in range(len(lst[i])): a += 1 return a
Is giving me an error:
TypeError: Failed in nopython mode pipeline (step: native lowering) cannot reflect element of reflected container: reflected list(reflected list(unicode_type)<iv=None>)<iv=None>
If i use my initial example data as input
count = myfunc(data)