[Numpy-discussion] Apply a vector function to each row of a matrix
David Huard
david.huard at gmail.com
Thu Oct 9 09:24:45 EDT 2008
Neal,
Look at: apply_along_axis
David
On Thu, Oct 9, 2008 at 8:04 AM, Neal Becker <ndbecker2 at gmail.com> wrote:
> 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))
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20081009/db91dc90/attachment.html>
More information about the NumPy-Discussion
mailing list