Hi Mehdi,
I suspect the immediate problem (though without the full code I can't be sure) is that you need to import the sqrt function, like this:
from math import sqrt
However, there is the larger problem that @vectorize is designed to create ufuncs, and what you have written below is not a ufunc. When you write a ufunc, it takes scalar arguments and relies on the broadcast rules of NumPy to extend the operation across the array.
I'm not totally sure what the intended algorithm here is, but you might be able to write this as a generalized ufunc:
But keep in mind that memory allocation on the GPU, of the sort that np.append, np.delete, and np.array do, is not supported by Numba's GPU target. That is partly on purpose, because that kind of code runs extremely inefficiently on the GPU.
Your final option would be to write a CUDA kernel using the cuda.jit decorator, but this requires learning the CUDA execution model:
I hope that helps point you in the right direction.