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
x1andx2are supported as eitherdpnp.ndarrayor scalar. Parametersdtype,outandwhereare supported with their default values. Sizes, shapes and data types of input arrays are supported to be equal. Keyword argumentskwargsare currently unsupported. Otherwise the function will be executed sequentially on CPU. Input data is supported as integer only.See also
dpnp.right_shiftShift 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]