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

Method __rand__

numpy/array_api/_array_object.py:821–830  ·  view source on GitHub ↗

Performs the operation __rand__.

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

Source from the content-addressed store, hash-verified

819 return self
820
821 def __rand__(self: Array, other: Union[int, bool, Array], /) -> Array:
822 """
823 Performs the operation __rand__.
824 """
825 other = self._check_allowed_dtypes(other, "integer or boolean", "__rand__")
826 if other is NotImplemented:
827 return other
828 self, other = self._normalize_two_args(self, other)
829 res = self._array.__rand__(other._array)
830 return self.__class__._new(res)
831
832 def __ifloordiv__(self: Array, other: Union[int, float, Array], /) -> Array:
833 """

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