Skip to content

Commit

Permalink
docstring formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrland99 committed Jul 22, 2022
1 parent 6ec08ff commit 27534a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/paste/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ def apply_trsf(
`points`.
Args:
M (nd.array): a 2x2 rotation matrix.
translation (nd.array): a translation vector of length 2.
points (nd.array): a nx2 array of `n` points 2D positions.
M (nd.array): A 2x2 rotation matrix.
translation (nd.array): A translation vector of length 2.
points (nd.array): A nx2 array of `n` points 2D positions.
Returns:
(nd.array) a nx2 matrix of the `n` points transformed.
(nd.array) A nx2 matrix of the `n` points transformed.
"""
if not isinstance(translation, np.ndarray):
translation = np.array(translation)
Expand Down
8 changes: 4 additions & 4 deletions src/paste/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def stack_slices_pairwise(
slices: List of slices.
pis: List of pi (``pairwise_align()`` output) between consecutive slices.
output_params: If ``True``, addtionally return angles of rotation (theta) and translations for each slice.
matrix: if ``True`` and output_params is also ``True``, the rotation is
matrix: If ``True`` and output_params is also ``True``, the rotation is
return as a matrix instead of an angle for each slice.
Returns:
Expand Down Expand Up @@ -95,7 +95,7 @@ def stack_slices_center(
slices: List of original slices to be aligned.
pis: List of pi (``center_align()`` output) between center_slice and slices.
output_params: If ``True``, additionally return angles of rotation (theta) and translations for each slice.
matrix: if ``True`` and output_params is also ``True``, the rotation is
matrix: If ``True`` and output_params is also ``True``, the rotation is
return as a matrix instead of an angle for each slice.
Returns:
Expand Down Expand Up @@ -163,11 +163,11 @@ def generalized_procrustes_analysis(X, Y, pi, output_params = False, matrix = Fa
Y: np array of spatial coordinates (ex: sliceB.obs['spatial'])
pi: mapping between the two layers output by PASTE
output_params: Boolean of whether to return rotation angle and translations along with spatial coordiantes.
matrix: Boolean of whether to return the rotation as a matrix or an angle
matrix: Boolean of whether to return the rotation as a matrix or an angle.
Returns:
Aligned spatial coordinates of X, Y, rotation angle, translation of X, translation of Y
Aligned spatial coordinates of X, Y, rotation angle, translation of X, translation of Y.
"""
assert X.shape[1] == 2 and Y.shape[1] == 2

Expand Down

0 comments on commit 27534a0

Please sign in to comment.