- cross(x1: array, x2: array, /, *, axis: int = - 1) array ¶
Returns the cross product of 3-element vectors. If
x2are multi-dimensional arrays (i.e., both have a rank greater than
1), then the cross-product of each pair of corresponding 3-element vectors is independently computed.
x1 (array) – first input array. Should have a numeric data type.
x2 (array) – second input array. Must have the same shape as
x1. Should have a numeric data type.
axis (int) – the axis (dimension) of
x2containing the vectors for which to compute the cross product. If set to
-1, the function computes the cross product for vectors defined by the last axis (dimension). Default:
out (array) – an array containing the cross products. The returned array must have a data type determined by Type Promotion Rules.