lang/python/ NumPy


fromfunction

numpy.fromfunction(f,shape)

This does not iterate over coordinates, calling f(i,j) for each i,j. Rather, it generates the two arrays ii=[0,1,...] and jj=[0,1,..] and then passes these to f.