You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NCubeInterior equality ignores parametric bounds, and is inconsistent with its hash #198
Two NCubeInterior objects with the same name but different parametric bounds compare equal, but they have different hashes. This breaks Python's requirement that a == b implies hash(a) == hash(b).
P._hashable_content() returns only ('P',), so == compares names only, while the hash depends on other data as well.
Expected
Patches with different bounds compare unequal, and __eq__ and __hash__ agree. Including min_coords and max_coords in _hashable_content would probably fix both.
Context
In PSYDAC we need to check that a user-given domain matches the domain stored in a geometry file. Because of this bug we have to compare the bounds explicitly.
Activity
FrederikSchnack commentedon Oct 6, 2026
I just checked with the changes in #193 , there both return false. In these changes, a lot of the hashing is changed.
Check user-given domain in Geometry.from_file
Add regression tests for #197 and #198
Upgrade SymPy (#193)