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

Method __mul__

numpy/array_api/_array_object.py:661–670  ·  view source on GitHub ↗

Performs the operation __mul__.

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

Source from the content-addressed store, hash-verified

659 return self.__class__._new(res)
660
661 def __mul__(self: Array, other: Union[int, float, Array], /) -> Array:
662 """
663 Performs the operation __mul__.
664 """
665 other = self._check_allowed_dtypes(other, "numeric", "__mul__")
666 if other is NotImplemented:
667 return other
668 self, other = self._normalize_two_args(self, other)
669 res = self._array.__mul__(other._array)
670 return self.__class__._new(res)
671
672 def __ne__(self: Array, other: Union[int, float, bool, Array], /) -> Array:
673 """

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