Skip to content

Commit e402150

Browse files
committed
A little more cleanup
1 parent f32bc7d commit e402150

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/aspire/classification/averager2d.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
def commute_shift_rot(shifts, rots):
1818
"""
1919
Rotate `shifts` points by `rots` ccw radians.
20+
21+
:param shifts: Array of shift points shaped (..., 2)
22+
:param rots: Array of rotations (radians)
23+
:returns: Array of rotated shift points shaped (..., 2)
2024
"""
2125
sx = shifts[:, 0]
2226
sy = shifts[:, 1]
@@ -778,12 +782,6 @@ def __init__(
778782

779783
self.n_angles = n_angles
780784

781-
# # XXX Will use polar for rotate
782-
# if not hasattr(self.alignment_basis, "rotate"):
783-
# raise RuntimeError(
784-
# f"{self.__class__.__name__}'s alignment_basis {self.alignment_basis} must provide a `rotate` method."
785-
# )
786-
787785
self.radius = radius if radius is not None else src.L // 16
788786

789787
if self.radius != 0:

src/aspire/image/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ def _im_translate(self, shifts):
668668
# Note original stack shape and flatten stack
669669
stack_shape = self.stack_shape
670670
if self.n_images == 1 and n_shifts > 1:
671-
# XXX special case, cleanup broadcasting later
671+
# Handle the shift broadcast special case
672672
stack_shape = n_shifts
673673
im = self.stack_reshape(-1)._data
674674

0 commit comments

Comments
 (0)