I have to make a calculation using complex arrays, however when using numba to speed up the process I get an error numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
. Here it is a simplified version of my code:
import numpy as np
from numba import jit
from numpy import array
@jit(nopython=True)
def func(x):
a = 1j
v = x*array([[1.,a],
[2.,3.]])
return v
func_vec = np.vectorize(func)
print(func_vec(10.))
It is important to note that if a
is real, everything works well. I have already tested a dtype=np.complex128
for v
, but the issue remain.
Numba version: 0.51.0
Numpy version: 1.22.3
Python version: 3.8.10
System: Ubuntu 20.4