mindspore.ops.bitwise_right_shift

View Source On Gitee
mindspore.ops.bitwise_right_shift(input, other)[source]

Perform a right bitwise shift operation on the input element-wise, where the number of bits to shift is specified by other.

outi=inputi>>otheri
Parameters
  • input (Union[Tensor, int, bool]) – The input to be right shifted.

  • other (Union[Tensor, int, bool]) – The number of bit to be applied on right arithmetic shift.

Returns

Tensor

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> input = mindspore.tensor([1, 2, 4, 8])
>>> mindspore.ops.bitwise_right_shift(input, 1)
Tensor(shape=[4], dtype=Int64, value= [0, 1, 2, 4])