mindspore.ops.bitwise_left_shift
- mindspore.ops.bitwise_left_shift(input, other)[source]
Perform a left bitwise shift operation on the input element-wise, where the number of bits to shift is specified by other.
\[\begin{aligned} &out_{i} =input_{i} << other_{i} \end{aligned}\]- Parameters
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> input = mindspore.tensor([1, 2, 4, 8]) >>> mindspore.ops.bitwise_left_shift(input, 1) Tensor(shape=[4], dtype=Int64, value= [ 2, 4, 8, 16])