I will probably have to delete this answer after a few minutes when I understand my mistake, but is the obvious thing not working?
>>> a = np.random.random((20,3))
>>> b = np.random.random((20,3))
>>> c = np.cross(a,b)
>>> c[0], np.cross(a[0], b[0])
(array([-0.02469147, 0.52341148, -0.65514102]), array([-0.02469147, 0.52341148, -0.65514102]))
>>> c[1], np.cross(a[1], b[1])
(array([-0.0733347 , -0.32691093, 0.40987079]), array([-0.0733347 , -0.32691093, 0.40987079]))
>>> all((c[i] == np.cross(a[i], b[i])).all() for i in range(len(c)))
True
source
share