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
x1andx2are supported asdpnp.ndarray. Keyword argumentskwargsare currently unsupported. Sizes of input arrays are limited byx1.size == 3 and x2.size == 3. Shapes of input arrays are limited byx1.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]