I have arrays A and B both of dimension MxNxH.

I would like to define a binary operator, to "multiply", such that the result is MxN dimensions.

The equivalent operation would be:

C = A[:,:,0] * B[:,:,0] + A[:,:,1] * B[:,:,1] + .... + A[:,:,H] * B[:,:,H]


Is there a way to do this operation in a more efficient way?
For example, using a built in function in numpy?

I have tried tensordot, but this gives a different result.


Question: UIView should catch tap event but pass on moving events
Answer: Gesture recognizers handle this sort of logic quite elegantly. Have a UITapGestureRecognizer on view2, and do whatever you want on view1 (e.g. a UIPanGestureRecognizer). That takes care of all of the "what gestures are recognized by what views" logic you need.