I currently have two vectors of shape (300L,) each. However, when I am trying to compute cross product between them through numpy cross function, it's throwing up the following error:
z = np.cross(x,y)
C:\Users\SMG059\AppData\Local\Continuum\Anaconda\lib\site-packages\numpy\core\numeric.pyc in cross(a, b, axisa, axisb, axisc, axis) 1525 "(dimension must be 2 or 3)") 1526 if a.shape[-1] not in (2, 3) or b.shape[-1] not in (2, 3): -> 1527 raise ValueError(msg) 1528 1529 # Create the output array
ValueError: incompatible dimensions for cross product (dimension must be 2 or 3)
Can someone please tell me how to compute cross product for large vectors?
np.dot
will work with an arbitrary number of dimensions. – xnx