I want to run my function in parallel, however all examples contain only (i) variable. I tried to apply all methods in https://www.delftstack.com/howto/python/parallel-for-loops-python/ https://www.delftstack.com/howto/python/parallel-for-loops-python/
One of my function is below. If I can solve problem for this function, I can handle other functions too.
def forlooptest(testX,N,kernel_matrix):
for i in range(0,10000):
if i % 100 == 0:
print(i)
for j in range(0,3):
img = testX[i,:,:,j]
filtered_img = sr_cnn(img,N,kernel_matrix)
testX_new[i,:,:,j]= filtered_img.astype(np.uint8)
return testX_new
Could you help me