Hi,

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()))

array([[1, 4],
         [2, 4],
         [3, 4],
         [1, 5],
         [2, 5],
         [3, 5]])

I guess there is an easier way to achieve this. Any hints ?

Greetings, Uwe
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to