Dup Goto 📝

NumPy

PT2/lang/python/old-notes 10-17 14:11:30
To Pop
5 lines, 31 words, 229 chars Tuesday 2023-10-17 14:11:30

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.