Re: [Numpy-discussion] Iterate over all 1-dim views

2007-10-08 Thread Stefan van der Walt
On Sun, Oct 07, 2007 at 06:52:11AM -0400, Neal Becker wrote: > Suppose I have a function F(), which is defined for 1-dim arguments. If the > user passes an n>1 dim array, I want to apply F to each 1-dim view. > > For example, for a 2-d array, apply F to each row and return a 2-d result. > > For

Re: [Numpy-discussion] Iterate over all 1-dim views

2007-10-07 Thread Gael Varoquaux
On Sun, Oct 07, 2007 at 06:52:11AM -0400, Neal Becker wrote: > Suppose I have a function F(), which is defined for 1-dim arguments. If the > user passes an n>1 dim array, I want to apply F to each 1-dim view. > For example, for a 2-d array, apply F to each row and return a 2-d result. > For a 3-

Re: [Numpy-discussion] Iterate over all 1-dim views

2007-10-07 Thread Pauli Virtanen
Neal Becker <[EMAIL PROTECTED]> kirjoitti: > Suppose I have a function F(), which is defined for 1-dim arguments. If the > user passes an n>1 dim array, I want to apply F to each 1-dim view. > > For example, for a 2-d array, apply F to each row and return a 2-d result. > > For a 3-d array, sele

[Numpy-discussion] Iterate over all 1-dim views

2007-10-07 Thread Neal Becker
Suppose I have a function F(), which is defined for 1-dim arguments. If the user passes an n>1 dim array, I want to apply F to each 1-dim view. For example, for a 2-d array, apply F to each row and return a 2-d result. For a 3-d array, select each 2-d subarray and see above. Return 3-d result.