Skip to content

Commit

Permalink
fixed docstring formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
niksirbi committed Jan 16, 2025
1 parent 0df1516 commit a028458
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions movement/kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def compute_heading_angle(
Heading angle is defined as the :func:`signed angle\
<movement.utils.vector.signed_angle_between_2d_vectors>`
between the animal's :func:`forward vector\
<movement.analysis.kinematics.compute_forward_vector>`)
<movement.kinematics.compute_forward_vector>`)
and a reference vector. By default, the reference vector
corresponds to the direction of the positive x-axis.
The returned angles are in degrees, unless ``in_radians=True``,
Expand Down Expand Up @@ -408,7 +408,7 @@ def compute_heading_angle(
--------
movement.utils.vector.signed_angle_between_2d_vectors : The underlying
function used to compute the signed angle between two 2D vectors.
movement.analysis.kinematics.compute_forward_vector : The function used
movement.kinematics.compute_forward_vector : The function used
to compute the forward vector.
"""
Expand Down
19 changes: 10 additions & 9 deletions movement/utils/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def signed_angle_between_2d_vectors(
Angles are returned in radians, spanning :math:`(-\pi, \pi]` according to
the arctan2 convention. The sign of the angle follows the sign of the 2D
cross product :``test_vector`` :math:`\times` ``reference_vector``
cross product ``test_vector`` :math:`\times` ``reference_vector``
and depends on the orientation of the coordinate system.
Parameters
Expand Down Expand Up @@ -203,14 +203,15 @@ def signed_angle_between_2d_vectors(
If passed as a numpy array, the reference vector must have
one of three shapes:
1. ``(2,)`` - Where dimension ``0`` contains spatial
coordinates (x,y), and no time dimension is specified.
2. ``(1,2)`` - Where dimension ``0`` corresponds to a
single time-point and dimension ``1`` contains spatial
coordinates (x,y).
3. ``(n,2)`` - Where dimension ``0`` corresponds to
time and dimension ``1`` contains spatial coordinates
(x,y), and where ``n == len(test_vector.time)``.
- ``(2,)``: where dimension ``0`` contains spatial
coordinates (x,y), and no time dimension is specified.
- ``(1,2)``:, where dimension ``0`` corresponds to a
single time-point and dimension ``1`` contains spatial
coordinates (x,y).
- ``(n,2)``: where dimension ``0`` corresponds to
time and dimension ``1`` contains spatial coordinates
(x,y), and where ``n == len(test_vector.time)``.
Reference vectors containing more dimensions, or with shapes
otherwise different from those defined above are considered
Expand Down

0 comments on commit a028458

Please sign in to comment.