dpnp.cross

dpnp.cross(x1, x2, axisa=- 1, axisb=- 1, axisc=- 1, axis=None)[source]

Return the cross product of two (arrays of) vectors.

For full documentation refer to numpy.cross.

Limitations

Parameters x1 and x2 are supported as dpnp.ndarray. Keyword arguments kwargs are currently unsupported. Sizes of input arrays are limited by x1.size == 3 and x2.size == 3. Shapes of input arrays are limited by x1.shape == (3,) and x2.shape == (3,). Otherwise the functions will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.

Examples

>>> import dpnp as np
>>> x = [1, 2, 3]
>>> y = [4, 5, 6]
>>> result = np.cross(x, y)
>>> [x for x in result]
[-3,  6, -3]