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

Method __imatmul__

numpy/array_api/_array_object.py:874–884  ·  view source on GitHub ↗

Performs the operation __imatmul__.

(self: Array, other: Array, /)

Source from the content-addressed store, hash-verified

872 return self.__class__._new(res)
873
874 def __imatmul__(self: Array, other: Array, /) -> Array:
875 """
876 Performs the operation __imatmul__.
877 """
878 # matmul is not defined for scalars, but without this, we may get
879 # the wrong error message from asarray.
880 other = self._check_allowed_dtypes(other, "numeric", "__imatmul__")
881 if other is NotImplemented:
882 return other
883 res = self._array.__imatmul__(other._array)
884 return self.__class__._new(res)
885
886 def __rmatmul__(self: Array, other: Array, /) -> Array:
887 """

Callers 1

test_operatorsFunction · 0.80

Calls 2

_check_allowed_dtypesMethod · 0.95
_newMethod · 0.80

Tested by 1

test_operatorsFunction · 0.64