Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
lochhh committed Sep 12, 2024
1 parent a44615e commit 58583b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions movement/analysis/kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def compute_interkeypoint_distances(
----------
data : xarray.DataArray
The input data containing
``('time', 'individuals', 'keypoints', 'space'`` as dimensions.
``('time', 'individuals', 'keypoints', 'space')`` as dimensions.
pairs : dict[str, str | list[str]], optional
A dictionary containing the mapping between pairs of keypoints.
The key is the keypoint and the value is a list of keypoints
Expand Down Expand Up @@ -424,16 +424,17 @@ def compute_interkeypoint_distances(
* key1 (key1) <U4 32B 'ind1' 'ind2'
* key2 (key2) <U4 32B 'ind1' 'ind2'
The resulting ``dist_key1_key2`` is a DataArray containing the computed
distances between ``key1`` and ``key2`` for all individuals
at each time point.
To obtain the distances between ``key1`` and ``key2`` within ``ind1``:
>>> dist_key1_key2.sel(key1="ind1", key2="ind1")
To obtain the distances between ``key1`` of ``ind1`` and
``key2`` of ``ind2``:
>>> dist_key1_key2.sel(key1="ind1", key2="ind2")
Compute the city block or Manhattan distance for multiple pairs of
Expand Down Expand Up @@ -530,7 +531,7 @@ def _compute_pairwise_distances(
----------
data : xarray.DataArray
The input data containing
``('time', 'individuals', 'keypoints', 'space'`` as dimensions.
``('time', 'individuals', 'keypoints', 'space')`` as dimensions.
dim : str
The dimension to compute the distances for. Must be either
``'individuals'`` or ``'keypoints'``.
Expand Down

0 comments on commit 58583b2

Please sign in to comment.