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

Method __hash__

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

Source from the content-addressed store, hash-verified

256 return SUPPORTED_TYPE[self.type].unflatten(children, self.aux_data)
257
258 def __hash__(self):
259 return hash(
260 tuple(
261 [
262 self.type,
263 self.aux_data,
264 self.num_leaves,
265 tuple([hash(x) for x in self.children_defs]),
266 ]
267 )
268 )
269
270 def __ne__(self, other) -> bool:
271 return not self.__eq__(other)

Callers

nothing calls this directly

Calls 1

hashFunction · 0.50

Tested by

no test coverage detected