dpnp.right_shift

dpnp.right_shift(x1, x2, dtype=None, out=None, where=True, **kwargs)[source]

Shift the bits of an integer to the right.

For full documentation refer to numpy.right_shift.

Limitations

Parameters x1 and x2 are supported as either dpnp.ndarray or scalar. Parameters dtype, out and where are supported with their default values. Sizes, shapes and data types of input arrays are supported to be equal. Keyword arguments kwargs are currently unsupported. Otherwise the function will be executed sequentially on CPU. Input data is supported as integer only.

See also

dpnp.left_shift

Shift the bits of an integer to the left.

Examples

>>> import dpnp as np
>>> x1 = np.array([10, 10, 10])
>>> x2 = np.array([1, 2, 3])
>>> out = np.right_shift(x1, x2)
>>> [i for i in out]
[5, 2, 1]