cross(x1: ivy.NativeArray, x2: ivy.NativeArray, f: Optional[ivy.Framework] = None) → ivy.NativeArray¶
Returns the cross product of two (arrays of) vectors in R^3. The cross product of x1 and x2 in R^3 is a vector perpendicular to both x1 and x2. If x1 and x2 are arrays of vectors, the vectors are defined by the last axis of x1 and x2 by default which must have dimension 3.
x1 (array) – Components of the first vector(s).
x2 (array) – Components of the second vector(s).
f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.
Vector cross product(s).