Skip to content

Commit

Permalink
Update type hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalrussell committed Jul 25, 2023
1 parent ae3a76f commit c48cb35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/snail/intersection.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ def get_indices(
return pandas.Series(index=(index_i, index_j), data=[i, j])


def idx_to_ij(idx: int, width: int, height: int):
def idx_to_ij(idx: int, width: int, height: int) -> Tuple[int]:
return numpy.unravel_index(idx, (height, width))


def ij_to_idx(ij: tuple[int], width: int, height: int):
def ij_to_idx(ij: Tuple[int], width: int, height: int):
return numpy.ravel_multi_index(ij, (height, width))

0 comments on commit c48cb35

Please sign in to comment.