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

DOC: clarify the requirements of the canonical sorting of Graph index #700

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions libpysal/graph/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ def __init__(self, adjacency, transformation="O", is_sorted=False):
initialize the class. The MultiIndex needs to be ordered i-->j
on both focal and neighbor levels according to the order of ids in the
original data from which the Graph is created. Sorting is performed by
default based on the order of unique values in the focal level. Set
``is_sorted=True`` to skip this step if the adjacency is already canonically
sorted.
default based on the order of unique values in the focal level. Sorting
needs to be reflected in both the values of the MultiIndex and also the
underlying MultiIndex.codes. Set ``is_sorted=True`` to skip this step if the
adjacency is already canonically sorted and you are certain about it.

"""
if not isinstance(adjacency, pd.Series):
Expand Down