The following error is obtained while trying to run my for loop involving a svd function
TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Untyped global name 'svd': cannot determine Numba type of <class 'function'>
The code is as given below.
from scipy.linalg import svd
import numpy as np
from numba import jit
PatchSize = 5
@jit(nopython=True)
def svd_solver(image):
Hight = image.shape[0]
Width = image.shape[1]
for i in range(PatchSize):
for j in range(PatchSize):
Count = Count+1
Patch = ImgInput[i:Hight-PatchSize+i+1,j:Width-PatchSize+j+1]
SG_S, SG_V, SG_D = svd(Patch)
return SG_V