[Numpy-discussion] Apply a vector function to each row of a matrix

Neal Becker ndbecker2@gmail....
Thu Oct 9 07:04:52 CDT 2008

Suppose I have a function (I wrote in c++) that accepts a numpy 1-d vector.  What is the recommended way to apply it to each row of a matrix, returning a new matrix result?  (Assume the function has signature newvec = f (oldvec))

More information about the Numpy-discussion mailing list