MCPcopy Create free account
hub / github.com/numpy/numpy / __lshift__

Method __lshift__

numpy/array_api/_array_object.py:616–625  ·  view source on GitHub ↗

Performs the operation __lshift__.

(self: Array, other: Union[int, Array], /)

Source from the content-addressed store, hash-verified

614 return self.__class__._new(res)
615
616 def __lshift__(self: Array, other: Union[int, Array], /) -> Array:
617 """
618 Performs the operation __lshift__.
619 """
620 other = self._check_allowed_dtypes(other, "integer", "__lshift__")
621 if other is NotImplemented:
622 return other
623 self, other = self._normalize_two_args(self, other)
624 res = self._array.__lshift__(other._array)
625 return self.__class__._new(res)
626
627 def __lt__(self: Array, other: Union[int, float, Array], /) -> Array:
628 """

Callers

nothing calls this directly

Calls 3

_check_allowed_dtypesMethod · 0.95
_normalize_two_argsMethod · 0.95
_newMethod · 0.80

Tested by

no test coverage detected