I am writing a fairly complicated Numba code and kept getting a cryptic error which took me a few hours to figure out. The error was the following:
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) No implementation of function Function(<built-in function array>) found for signature: >>> array(array(float64, 1d, C)) There are 2 candidate implementations: - Of which 2 did not match due to: Overload in function 'array': File: numba/core/typing/npydecl.py: Line 504. With argument(s): '(array(float64, 1d, C))': Rejected as the implementation raised a specific error: ... (truncated)
I discovered that the problem was the result of creating new numpy arrays using lists instead of tuples. So instead of np.array([1,2,3]), I was supposed to do np.array((1,2,3)). That’s it!
I found the solution by reading the Numba documentation (https://numba.pydata.org/numba-doc/latest/reference/numpysupported.html)
(nested lists are not yet supported by Numba)