[Numpy-discussion] cross product of two vectors as sets
Thu Sep 11 07:32:35 CDT 2008
I want to calculate the crossproduct (from set theory, not vectorspace
crossproduct) of two vectors x,y.
My method is as follows:
>>> x = array([1,2,3])
>>> y = array([4,5])
>>> xx, yy = meshgrid(x,y)
>>> array(zip(xx.flatten(), yy.flatten()))
I guess there is an easier way to achieve this. Any hints ?
More information about the Numpy-discussion