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

Neal Becker ndbecker2 at gmail.com
Thu Oct 9 08:04:52 EDT 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