From c48cb35f0759361c377709d46443603a2fc401e8 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Tue, 25 Jul 2023 17:54:37 +0100 Subject: [PATCH] Update type hinting --- src/snail/intersection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snail/intersection.py b/src/snail/intersection.py index f6267b0..26b7686 100644 --- a/src/snail/intersection.py +++ b/src/snail/intersection.py @@ -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))