[Numpy-discussion] combinatorial operations on a pair of arrays
damienlmoore at gmail.com
Wed Nov 18 15:43:09 EST 2009
ugh... I goofed. The code snippet should have read
from numpy import *
for i in xrange(len(A)):
On Wed, Nov 18, 2009 at 2:17 PM, Damien Moore <damienlmoore at gmail.com> wrote:
> The title of this e-mail is probably misleading so let me just show some code:
> from numpy import *
> for i in xrange(len(A)):
> print C
> What I want to do is eliminate the for loop and rely on numpy
> internals, but I'm not sure how to do this most efficiently.
> The fundamental aspect of the operation is that the array C is
> constructed by applying each subarray B to each subarray of A (i.e.
> all permutations) and then summing over a subset.
More information about the NumPy-Discussion