From 6aedb79056c85a1538ee2502a61bf3d1028be431 Mon Sep 17 00:00:00 2001 From: Ethan Blackwood Date: Fri, 29 Mar 2024 13:08:04 -0400 Subject: [PATCH] Fix invalid indexing for python <3.11 --- caiman/utils/sbx_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caiman/utils/sbx_utils.py b/caiman/utils/sbx_utils.py index 05f0f05a4..f9ca8ff5a 100644 --- a/caiman/utils/sbx_utils.py +++ b/caiman/utils/sbx_utils.py @@ -432,7 +432,7 @@ def get_chunk(n: int): chunk = np.transpose(chunk, (0, 4, 2, 1, 3))[channel] # to (frames, Y, X, Z) if not is3D: chunk = np.squeeze(chunk, axis=3) - return chunk[:, *np.ix_(*subindices[1:])] + return chunk[(slice(None),) + np.ix_(*subindices[1:])] if frame_stride == 1: sbx_file.seek(subindices[0][0] * frame_size, 0)