MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / __hash__

Method __hash__

imperative/python/megengine/traced_module/pytree.py:347–350  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

345 return self.type == other.type and self.const_val == other.const_val
346
347 def __hash__(self):
348 if isinstance(self.const_val, np.ndarray):
349 return hash(tuple([self.type, str(self.const_val)]))
350 return hash(tuple([self.type, self.const_val]))
351
352 def __repr__(self):
353

Callers

nothing calls this directly

Calls 2

strFunction · 0.85
hashFunction · 0.50

Tested by

no test coverage detected