I have two vectors evaluated at say 10,000 points as two
[3, 10000] arrays. Reading the definitions for
np.einsum I don't understand how to use them without a loop to get the cross product here.
This is what I do now, just hard-wired arrays. Can either of those, or anything else within the
scipy universe do this as fast? I'm thinking that it would be nicer to use something standard like
np.einsum even if it's the same speed as my method, but I don't see how without looping.
def cross_these(a, b): c0 = a*b - a*b c1 = a*b - a*b c2 = a*b - a*b return np.vstack((c0, c1, c2))