How to save data within a jitted function

Hi, I want to save some data (e.g. a np.array) inside a jitted function / class. I have seen that np.save is not yet supported nor is the native python way of saving (e.g. file = open(…); file.write…) as File I/O will fallback to python.

Is there another way of saving a np.array into a file?

Thanks!

You can use an object mode block:

https://numba.readthedocs.io/en/stable/user/withobjmode.html

You can call no.save inside that block.