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

Fixed recursive operations (and/or/sub) in hyper cube set, to not ch… #369

Merged
merged 6 commits into from
Nov 29, 2022

Conversation

tanyaveksler
Copy link
Member

…ange self during the recursive (sub)calls.

Signed-off-by: Tanya tatyana@il.ibm.com

…nge self during the recursive (sub)calls.

Signed-off-by: Tanya <tatyana@il.ibm.com>
adisos and others added 2 commits November 28, 2022 15:39
Signed-off-by: adisos <adisos@il.ibm.com>
@adisos adisos linked an issue Nov 28, 2022 that may be closed by this pull request
res_layers = dict()
for self_layer in self.layers:
for other_layer in other.layers:
common_elem = self_layer & other_layer
if not common_elem:
continue
if self._is_last_dimension():
res_layers[common_elem] = self.layers[self_layer]
res_layers[common_elem] = self.layers[self_layer].copy()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the copy required here?

@adisos adisos self-requested a review November 28, 2022 21:08
Copy link
Member

@adisos adisos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add documentation or tests to cases where copy is required?

@tanyaveksler tanyaveksler merged commit be05f87 into master Nov 29, 2022
@tanyaveksler tanyaveksler deleted the fixed-HC-set branch November 29, 2022 09:10
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.

hypercubeset issue
2 participants