Skip to content

Commit

Permalink
Drop conversion of getitem arguments to tuple.
Browse files Browse the repository at this point in the history
No need for this as it is already done elsewhere downstream.
  • Loading branch information
ivilata committed Dec 27, 2023
1 parent e5a77ec commit 8f5ec5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions b2h5py/blosc2.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,10 @@ def is_b2_fast_slicing(self) -> bool:
return getattr(self, opt_dataset_ok_prop)

def __getitem__(self, args):
slice_ = args if isinstance(args, tuple) else (args,)
try:
selection = opt_slice_check(self, slice_)
selection = opt_slice_check(self, args)
except NoOptSlicingError:
return self.__dataset.__getitem__(slice_)
return self.__dataset.__getitem__(args)
with h5phil:
return opt_selection_read(self.__dataset, selection)

Expand Down
2 changes: 0 additions & 2 deletions b2h5py/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ def B2Dataset_opt_dataset_ok(self):


def B2Dataset___getitem__(self, args, new_dtype=None):
args = args if isinstance(args, tuple) else (args,)

with h5phil:
try:
return b2.opt_slice_read(self, args, new_dtype)
Expand Down

0 comments on commit 8f5ec5b

Please sign in to comment.