mlx.core.left_shift

目录

mlx.core.left_shift#

left_shift(a: scalar | array, b: scalar | array, stream: None | Stream | Device = None) array#

Element-wise left shift.

Shift the bits of the first input to the left by the second using numpy-style broadcasting semantics. Either or both input arrays can also be scalars.

参数:
  • a (array) -- Input array or scalar.

  • b (array) -- Input array or scalar.

返回:

The bitwise left shift a << b.

返回类型:

array