How to create new numpy array by using a function on every row with no loops
up vote 0 down vote favorite so I've got a project which asks of me to use a DFT function that I've built (on an array of size [N,1]) and use that function on an entire image of size [N,M]. I've been asked to do so using no loops and I can't figure it out. Is there a way to use a function on each one of my rows which returns a new row and that way build a new numpy array without loops? python-3.x image-processing computer-science share | improve this question asked Nov 9 at 21:26 edan patt 1 Sounds like you're looking for numpy.apply_along_axis – jwil Nov 9 at 21:28 1 Hey, so numpy.apply_along_axis uses a for loop internally and is slow, I've already tested it and I wasn't very happy with the results. – edan patt Nov 9 at 21:30 add a comment | up vote 0 down vote favorite so I've got a project which asks of me to use a DFT function that I've built (on an array o...