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

Endpoint comparison: check only for Endpoint instances #154

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

MarkDana
Copy link
Collaborator

Updated files:

  • causallearn/graph/Endpoint.py: in the reloaded __eq__, replace self.value == other.value by isinstance(other, Endpoint) and self.value == other.value.

Related to:

The issue: #149 and earlier pr #109. In some of our codes, the Endpoint comparison is in the form of get_end_point(...) == Endpoint.ARROW, while the first function may return None, instead of any Endpoint instances. This patch fixed this issue.

Tests:

TestFCI can now pass, and the issues mentioned in #149 are addressed.

@kunwuz kunwuz assigned kunwuz and unassigned kunwuz Nov 23, 2023
@kunwuz kunwuz self-requested a review November 23, 2023 16:35
@kunwuz kunwuz merged commit d6d9312 into py-why:main Nov 23, 2023
2 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.

2 participants