symengine.py icon indicating copy to clipboard operation
symengine.py copied to clipboard

hash for DenseMatrix should not be allowed

Open rikardn opened this issue 2 years ago • 0 comments

Trying to hash any DenseMatrix will return 0. Instead it should raise since we shouldn't allow hashing a mutable object.

import symengine

hash(symengine.Matrix())
>>> 0

hash(symengine.Matrix([1, 2]))
>>> 0

rikardn avatar Jan 25 '24 09:01 rikardn