I have this function fs(i,j,dif). It is easy to vectorize this function by doing
vfunc = np.vectorize(fs)
The thing is, I want calculate the output of this function for
i=0, j=1,2,3,4,5, ...ysize-1
i=1, J=1,2,3,4,5, ...ysize-1
....
i=xsize-1, j=1,2,3,4,5 ... ysize-1
For one value of i, there is no problem with vfunc(0, np.arange(ysize), 0) (dif=0)
But I can't find out how to do it for all values of i.
The only way I manage to do it was
vfunc([[0],[1],[2],...[xsize-1]], np.arange(ysize), 0)
which is not feasible for a large xsize. Is there a way to do it?
iisnp.arange(xsize)[:,None], a (xsjze,1) shape array.