MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / __index__

Method __index__

tensorflow/python/framework/ops.py:869–873  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

867 return float(self._numpy())
868
869 def __index__(self):
870 maybe_arr = self._numpy()
871 if isinstance(maybe_arr, np.ndarray):
872 return maybe_arr.__index__()
873 return int(maybe_arr) # Must be a NumPy scalar.
874
875 def __bool__(self):
876 return bool(self._numpy())

Callers

nothing calls this directly

Calls 1

_numpyMethod · 0.95

Tested by

no test coverage detected