pyarrow.compute.shift_right_checked

pyarrow.compute.shift_right_checked(x, y, *, memory_pool=None)

Right shift x by y with invalid shift check.

Perform a logical shift for unsigned x and an arithmetic shift for signed x. This function will raise an error if y (the amount to shift by) is: (1) negative or (2) greater than or equal to the precision of x. See “shift_right” for a variant that doesn’t fail for an invalid shift amount

Parameters
  • x (Array-like or scalar-like) – Argument to compute function

  • y (Array-like or scalar-like) – Argument to compute function

  • memory_pool (pyarrow.MemoryPool, optional) – If not passed, will allocate memory from the default memory pool.