Using scipy.sparse.linalg.spsolve in numba

I want to use spsolve in Numba, but it will report error.
Maybe the numba-scipy is helpful, but I do not how to use the numba-scipy in my code, coulde anyone help me, thanks.

here is an example code

from numba import jit
from scipy.sparse.linalg import spsolve

@jit(nopython=True)
def func1(~, ~,...):
      A = dok_matrix(matrix_size, dtype=float)
      b = np.zeros((matrix_size[0], 1))
      x = spsolve(A, b)   # this will be a error
      return x
     

Do you have a minimal, runnable, complete sample that works in plain python but doesn’t work jitted?

I wouldn’t expect much speedup with numba if the bulk of the function time is spent in an optimized scipy routine.