Skip to content

Commit

Permalink
refactor(camtools): change array dimension notation from uppercase 'N…
Browse files Browse the repository at this point in the history
…' to lowercase 'n' for consistency and clarity
  • Loading branch information
yxlao committed Oct 13, 2024
1 parent 6d79b53 commit 10b47f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions camtools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def points_to_pixels(
points: Float[np.ndarray, "N 3"],
points: Float[np.ndarray, "n 3"],
K: Float[np.ndarray, "3 3"],
T: Float[np.ndarray, "4 4"],
) -> Float[np.ndarray, "N 2"]:
Expand Down Expand Up @@ -67,9 +67,9 @@ def im_depth_to_point_cloud(
ignore_invalid: bool = True,
scale_factor: float = 1.0,
) -> Union[
Float[np.ndarray, "N 3"],
Float[np.ndarray, "n 3"],
Float[np.ndarray, "h w 3"],
Tuple[Float[np.ndarray, "N 3"], Float[np.ndarray, "N 3"]],
Tuple[Float[np.ndarray, "n 3"], Float[np.ndarray, "n 3"]],
Tuple[Float[np.ndarray, "h w 3"], Float[np.ndarray, "h w 3"]],
]:
"""
Expand Down
4 changes: 2 additions & 2 deletions camtools/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ def point_plane_distance_three_points(point, plane_points):


def points_to_mesh_distances(
points: Float[np.ndarray, "N 3"],
points: Float[np.ndarray, "n 3"],
mesh: o3d.geometry.TriangleMesh,
) -> Float[np.ndarray, "N"]:
) -> Float[np.ndarray, "n"]:
"""
Compute the distance from points to a mesh surface.
Expand Down
4 changes: 2 additions & 2 deletions test/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ def test_union_of_hints():
def identity(
arr: Union[
Float[Tensor, "3 4"],
Float[Tensor, "N 3 4"],
Int[Tensor, "N 3 4"],
Float[Tensor, "n 3 4"],
Int[Tensor, "n 3 4"],
]
):
return arr
Expand Down

0 comments on commit 10b47f5

Please sign in to comment.