Dup Goto 📝

NumPy

PT2/aw/lang/python 07-31 13:46:41
To Pop
5 lines, 31 words, 229 chars Monday 2023-07-31 13:46:41

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.