Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix __hash__ and __eq__ for basix.ufl elements #718

Merged
merged 21 commits into from Nov 1, 2023

Conversation

conpierce8
Copy link
Contributor

Addresses #717 by synchronizing the repr (which is used to compute the hash) and __eq__ functions for all element types in basix.ufl.

@mscroggs mscroggs linked an issue Oct 27, 2023 that may be closed by this pull request
python/basix/ufl.py Outdated Show resolved Hide resolved
python/basix/ufl.py Outdated Show resolved Hide resolved
python/basix/ufl.py Outdated Show resolved Hide resolved
@conpierce8
Copy link
Contributor Author

Added tests for __eq__ and __hash__. Are these overkill? Suggestions welcome. (Seems like I've added a lot of code to test some minor functionality.)

python/basix/ufl.py Outdated Show resolved Hide resolved
python/basix/ufl.py Outdated Show resolved Hide resolved
python/basix/ufl.py Outdated Show resolved Hide resolved
python/basix/ufl.py Outdated Show resolved Hide resolved
@mscroggs mscroggs marked this pull request as ready for review November 1, 2023 08:39
@mscroggs mscroggs merged commit 4671404 into FEniCS:main Nov 1, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conflicting __eq__/__hash__ in basix.ufl._BlockedElement
3 participants