Skip to content

Commit

Permalink
prep slice
Browse files Browse the repository at this point in the history
  • Loading branch information
APN-Pucky committed Oct 9, 2024
1 parent 9c1fa43 commit 9043b8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/babyyoda/Histo2D_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def __getitem__(self, slices):
if isinstance(slices, tuple):
if len(slices) == 2:
ix, iy = self.__get_indices(slices)
return self.__get_by_indices(ix, iy)
if isinstance(ix, int) and isinstance(iy, int):
return self.__get_by_indices(ix, iy)
# TODO implement slice
raise TypeError("Invalid argument type")

Expand Down

0 comments on commit 9043b8b

Please sign in to comment.