Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ignore rgb dims in subsample_array #794

Closed
@kushalkolar

Description

@kushalkolar

this should do it:

Index: fastplotlib/utils/functions.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/fastplotlib/utils/functions.py b/fastplotlib/utils/functions.py
--- a/fastplotlib/utils/functions.py	
+++ b/fastplotlib/utils/functions.py	(date 1744521697634)
@@ -460,8 +460,12 @@
 
     # get the step size for the slices
     slices = [slice(None, None, int(s)) for s in np.floor(arr.shape / ns).astype(int)]
+
+    # omit dims that should be ignored
     if ignore_dims is not None:
         for dim in ignore_dims:
             slices[dim] = slice(None)
-            
+
+    slices = tuple(slices)
+
     return np.asarray(arr[slices])

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions