David Huard wrote:
...
> I've edited the docstring at
> http://sd-2116.dedibox.fr/pydocweb/doc/numpy.lib.shape_base.apply_along_axis/
>
> Feel free to improve on it.
Thanks! That is better.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.or
On Thu, Oct 9, 2008 at 2:48 PM, Neal Becker <[EMAIL PROTECTED]> wrote:
> David Huard wrote:
>
> > On Thu, Oct 9, 2008 at 9:40 AM, Neal Becker <[EMAIL PROTECTED]> wrote:
> >
> >> David Huard wrote:
> >>
> >> > Neal,
> >> >
> >> > Look at: apply_along_axis
> >> >
> >> >
> >> I guess it'd be:
> >>
>
David Huard wrote:
> On Thu, Oct 9, 2008 at 9:40 AM, Neal Becker <[EMAIL PROTECTED]> wrote:
>
>> David Huard wrote:
>>
>> > Neal,
>> >
>> > Look at: apply_along_axis
>> >
>> >
>> I guess it'd be:
>>
>> b = empty_like(a)
>> for row in a.shape[0]:
>> b[row,:] = apply_along_axis (func, row, a)
>>
>
On Thu, Oct 9, 2008 at 9:40 AM, Neal Becker <[EMAIL PROTECTED]> wrote:
> David Huard wrote:
>
> > Neal,
> >
> > Look at: apply_along_axis
> >
> >
> I guess it'd be:
>
> b = empty_like(a)
> for row in a.shape[0]:
> b[row,:] = apply_along_axis (func, row, a)
>
> I don't suppose there is a way to d
Neal,
Look at: apply_along_axis
David
On Thu, Oct 9, 2008 at 8:04 AM, Neal Becker <[EMAIL PROTECTED]> 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? (Assu
David Huard wrote:
> Neal,
>
> Look at: apply_along_axis
>
>
I guess it'd be:
b = empty_like(a)
for row in a.shape[0]:
b[row,:] = apply_along_axis (func, row, a)
I don't suppose there is a way to do this without explicitly writing a loop.
___
Num
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 m