inducer / pymbolic

A simple package to do symbolic math (focus on code gen and DSLs)
http://mathema.tician.de/software/pymbolic
Other
107 stars 25 forks source link

tests: fix random graph hash #141

Closed alexfikl closed 3 months ago

alexfikl commented 3 months ago

Seems like there was a numpy int that snuck in there and something changed about its hash in 2.0.

EDIT: It was actually this: the repr for an np.int64(3) changed from '3' to 'np.int64(3)'

    def map_constant(self, expr):
        self.key_hash.update(repr(expr).encode("utf8"))

Should the PersistentHashWalkMapper be changed instead?

inducer commented 3 months ago

Thanks for tracking down what caused this! Yes, the PersistentHashWalkMapper should be fixed. I've done that in #142. Closing here.