py-why / causal-learn

Causal Discovery in Python. It also includes (conditional) independence tests and score functions.
https://causal-learn.readthedocs.io/en/latest/
MIT License
1.04k stars 174 forks source link

Endpoint comparison: check only for Endpoint instances #154

Closed MarkDana closed 7 months ago

MarkDana commented 7 months ago

Updated files:

Related to:

The issue: https://github.com/py-why/causal-learn/issues/149 and earlier pr https://github.com/py-why/causal-learn/pull/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 https://github.com/py-why/causal-learn/issues/149 are addressed.