Skip to content

Commit

Permalink
Merge pull request #546 from jGaboardi/graph_asymm_docstring
Browse files Browse the repository at this point in the history
clarify `Graph.asymmetry()` docstring
  • Loading branch information
jGaboardi committed Aug 8, 2023
2 parents c6d8e2a + 7c942e4 commit e579820
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions libpysal/graph/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,14 +762,15 @@ def asymmetry(self, intrinsic=True):
Parameters
----------
intrinsic : bool, optional
Default is ``True``. Intrinsic symmetry is defined as
Default is ``True``. Intrinsic symmetry is defined as:
.. math::
w_{i,j} == w_{j,i}
If ``intrinsic`` is ``False`` symmetry is defined as
If ``intrinsic`` is ``False`` symmetry is defined as:
.. math::
Expand All @@ -782,8 +783,13 @@ def asymmetry(self, intrinsic=True):
Returns
-------
pandas.Series
``Series`` of ``(i,j)`` pairs of asymmetries
A ``Series`` of ``(i,j)`` pairs of asymmetries sorted
ascending by the focal observation (index value),
where ``i`` is the focal and ``j`` is the neighbor.
An empty ``Series`` is returned if no asymmetries are found.
"""
if intrinsic:
wd = self.sparse.transpose() - self.sparse
Expand Down

0 comments on commit e579820

Please sign in to comment.