bundles / numpy latest / numpy / ma / core / left_shift
function
numpy.ma.core:left_shift
source: build-install/usr/lib/python3.14/site-packages/numpy/ma/core.py :7409
Signature
def left_shift ( a , n ) Summary
Shift the bits of an integer to the left.
Extended Summary
This is the masked array version of numpy.left_shift, for details see that function.
Examples
Shift with a masked array:arr = np.ma.array([10, 20, 30], mask=[False, True, False]) np.ma.left_shift(arr, 1)Large shift:
np.ma.left_shift(10, 10)
Shift with a scalar and an array:
scalar = 10 arr = np.ma.array([1, 2, 3], mask=[False, True, False]) np.ma.left_shift(scalar, arr)
See also
Aliases
-
numpy.ma.left_shift