MultiIter version of PyArray_IterAllButAxis ?
Hello, I am writing a UFunc creation utility, and I would like to know: is there a way to mimic the behavior ofPyArray_IterAllButAxis for multiple arrays at a time? I would like to be able to write UFuncs that take an axis argument and also take multiple array arguments, for example I want to be able to create a moving average with a weighting that changes according to another array. Best Regards, John
On 12/02/2010 12:35 PM, John Salvatier wrote:
Hello,
I am writing a UFunc creation utility, and I would like to know: is there a way to mimic the behavior ofPyArray_IterAllButAxis for multiple arrays at a time?
Is there a reason why creating a separate iterator for each array is not possible ? cheers, David
On Wed, Dec 1, 2010 at 7:56 PM, David <david@silveregg.co.jp> wrote:
On 12/02/2010 12:35 PM, John Salvatier wrote:
Hello,
I am writing a UFunc creation utility, and I would like to know: is there a way to mimic the behavior ofPyArray_IterAllButAxis for multiple arrays at a time?
Is there a reason why creating a separate iterator for each array is not possible ?
If the arrays are not the same shape, separate iterators won't be aligned, so if the results are going into a broadcasted result array, the computation won't be correct.
participants (2)
-
David
-
John Salvatier