ma.right_shift(a, n)
Shift the bits of an integer to the right.
This is the masked array version of
, for details see that function.
Examples
>>> importnumpyasnp>>> importnumpy.maasma>>> x=[11,3,8,1]>>> mask=[0,0,0,1]>>> masked_x=ma.masked_array(x,mask)>>> masked_xmasked_array(data=[11, 3, 8, --], mask=[False, False, False, True], fill_value=999999)>>> ma.right_shift(masked_x,1)masked_array(data=[5, 1, 4, --], mask=[False, False, False, True], fill_value=999999)