numpy array product driving me mad

2015-03-20 Thread Mr. Twister
Hi everyone. Hope you can help me overcome this noob issue. I have two numpy arrays: P array([[[ 2, 3], [33, 44], [22, 11], [ 1, 2]]]) R array([0, 1, 2, 3]) the values of these may of course be different. The important fact is that: P.shape (1, 4, 2) R.shape (4,)

Re: numpy array product driving me mad

2015-03-20 Thread Mr. Twister
I think that you want P * R[;,None] Sorry, I meant P * R[:, None] Manolo Muchísimas gracias, Manolo. Eres un genio y me has ayudado mucho. Te debo una. -- https://mail.python.org/mailman/listinfo/python-list