dpnp.left_shift

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

Shift the bits of an integer to the left.

For full documentation refer to numpy.left_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.right_shift

Shift the bits of an integer to the right.

Examples

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