Hello, I have a code that runs smoothly on older versions of Numba (`0.56.4`

) and SciPy (`1.7.3`

). However, it encounters issues with the latest releases of these libraries. Specifically, I am looking for a way to integrate Numba’s `vectorize`

decorator with the Bessel functions `J0`

and `J1`

from SciPy’s `special`

module. Has anyone successfully accomplished this, especially in the context of the most recent versions of Numba and SciPy? I’d appreciate any insights or code examples. Thank you.

```
import numba
import scipy.special as sc
from numba import vectorize
# import numba_special # The import generates Numba overloads for special
@numba.vectorize('float64(float64,float64,float64)',nopython=True)
def f(ro, rs, delta):
return rs / ro * np.exp((-1 / delta) * (ro - rs))
@numba.vectorize('float64(float64,float64,float64)',nopython=True)
def mz(ro, rs, delta):
return (1 - f(ro, rs, delta)**2) / (1 + f(ro, rs, delta)**2)
@numba.vectorize('float64(float64,float64,float64)',nopython=True)
def mro(ro, rs, delta):
return (2 * f(ro, rs, delta) ) / (1 + f(ro, rs, delta)**2)
@vectorize('float64(float64)',nopython=True)
def jj0(x):
return(sc.j0(x))
@vectorize('float64(float64)',nopython=True)
def jj1(x):
return(sc.j1(x))
@vectorize('float64(float64,float64,int64,float64,float64,float64,float64,float64)',nopython=True)
def h_ro(a,b,N,ro,z,r1,r2,lz):
zeta = r2/r1
beta = lz/r1
x = np.linspace(a+(b-a)/(2*N), b-(b-a)/(2*N), N)
fx = jj1(x*ro)*(zeta*jj1(x*zeta)-jj1(x))*np.exp(x*beta*z)*(1-np.exp(-x*beta))
area = np.sum(fx)*(b-a)/N
return area
```