Skip to content

Commit

Permalink
戻り値の型アノテーション
Browse files Browse the repository at this point in the history
  • Loading branch information
PINTO0309 committed Oct 31, 2023
1 parent d21ff68 commit a432b02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo_goldyolo_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ def rotate_and_crop_rectangle(

return rotated_croped_images, rec_size_difference_rotation_angle

def rotate_points(*, points_xy: np.ndarray, degree: float):
def rotate_points(*, points_xy: np.ndarray, degree: float) -> np.ndarray:
# 角度をラジアンに変換
theta = np.radians(degree)
# 回転行列を作成
Expand All @@ -1465,7 +1465,7 @@ def rotate_points(*, points_xy: np.ndarray, degree: float):
rotated_points: np.ndarray = np.dot(points_xy, rotation_matrix.T)
return rotated_points

def rotate_points_around_center(*, points_xy: np.ndarray, degree: float, cx: float, cy: float):
def rotate_points_around_center(*, points_xy: np.ndarray, degree: float, cx: float, cy: float) -> np.ndarray:
# 角度をラジアンに変換
theta = np.radians(degree)
# 回転行列を作成
Expand Down

0 comments on commit a432b02

Please sign in to comment.