[Numpy-discussion] cross product of two vectors as sets

Alan G Isaac aisaac@american....
Thu Sep 11 08:39:25 CDT 2008

Set product could be produced as::

   dp = list((xi,yi) for xi in x for yi in y)
   dpasarray = np.array(dp)

but unless you really need the array,
you can use a generator.

Alan Isaac

More information about the Numpy-discussion mailing list