Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 27, 2024
1 parent 10784f9 commit 36421db
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/nwbinspector/utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ def _cache_data_retrieval_command(
return data[selection]


def cache_data_selection(
data: Union[h5py.Dataset, ArrayLike], selection: Union[slice, tuple[slice]]
) -> np.ndarray:
def cache_data_selection(data: Union[h5py.Dataset, ArrayLike], selection: Union[slice, tuple[slice]]) -> np.ndarray:
"""Extract the selection lazily from the data object for efficient caching (most beneficial during streaming)."""
if isinstance(data, np.memmap): # np.memmap objects are not hashable - simply return the selection lazily
return data[selection]
Expand Down

0 comments on commit 36421db

Please sign in to comment.