Repository navigation
Conversation
Member
|
Good catch. This is fixed in #100 which drops |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PhysicalToReference.__eq__checksisinstance(other, ReferenceToPhysical), and__hash__uses the key"uflx.ReferenceToPhysical": both were copied fromReferenceToPhysical. As a result:PhysicalToReferenceis not equal to itself, or to a copy rebuilt from the same arguments, which is howreplaceand the pull-back rebuild nodes, so a rebuilt copy is not found in a dict keyed by the original;ReferenceToPhysicalwith the same arguments, and has the same hash, so a set or graph merges the two opposite maps into one node.It also does not override
is_reference, so a point mapped to the reference cell reportsFalse.returns on
mainG == G: False G == PhysicalToReference(x, domain): False G == ReferenceToPhysical(x, domain): True len({G, ReferenceToPhysical(x, domain)}): 1 G.is_reference: Falseand with this PR
G == G: True G == PhysicalToReference(x, domain): True G == ReferenceToPhysical(x, domain): False len({G, ReferenceToPhysical(x, domain)}): 2 G.is_reference: TrueChanges
PhysicalToReference.__eq__and__hash__refer toPhysicalToReference.PhysicalToReference.is_referenceisTrue.test/test_point_map_equality.py. Both tests fail onmain.