This code compiles and runs just fine:
cdef enum:
SIZE = 1000000
cdef int ar[SIZE]
cdef int i
for i in range(SIZE):
ar[i] = i
print(ar[5])
but this code:
cdef enum:
SIZE = 1000000
def test():
cdef int ar[SIZE]
cdef int i
for i in range(SIZE):
ar[i] = i
print(ar[5])
test()
crashes the python kernel (I'm running this with jupyter magic).
Is there some limit to how large arrays can in inside of functions? If there is, is there a way to remove that limit?