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

Method __hash__

numpy/f2py/symbolic.py:240–247  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

238 and self.data == other.data)
239
240 def __hash__(self):
241 if self.op in (Op.TERMS, Op.FACTORS):
242 data = tuple(sorted(self.data.items()))
243 elif self.op is Op.APPLY:
244 data = self.data[:2] + tuple(sorted(self.data[2].items()))
245 else:
246 data = self.data
247 return hash((self.op, data))
248
249 def __lt__(self, other):
250 if isinstance(other, Expr):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected