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: Proxy.pac myIpAddress() returns local address and not ethernet adapters
Answer: Unfortunately, getting myIpAddress() to return the correct address in Windows does involve changing the priority of the NICs (in Windows XP this is in the "Advanced Settings..." dialog of the "Advanced" menu of the "Network Connections" dialog).

Here's someone else's problem that looks like what you're seeing: http://www.geurtsrus.com/gerke/2005/01/proxy-auto-configuration-blues.html

You might do better to detect the IP address that need proxying, rather than the ones that don't (i.e. local subnets in the company) and assume DIRECT otherwise.

Another alternative would be to pass a different PAC DHCP option to clients on the VPN. That might be easy if your VPN users are coming out of a dedicated subnet, but it might not be if they're coming out of a LAN subnet.