We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7dc207b + 8cdbbef commit f205782Copy full SHA for f205782
hexrd/imageseries/process.py
@@ -78,9 +78,20 @@ def _process_frame(self, key):
78
# optimized version. If the adapter provides one it should be
79
# significantly faster if not it will fallback to the same
80
# implementation that _rectangle provides.
81
- if oplist and oplist[0][0] == self.RECT:
+ if oplist and oplist[0][0] == self.RECT:
82
region = oplist[0][1]
83
- img = self._rectangle_optimized(key,region)
+ if isinstance(key, int):
84
+ idx = key
85
+ rest = []
86
+ else:
87
+ # Handle fancy indexing
88
+ idx = key[0]
89
+ rest = key[1:]
90
+
91
+ img = self._rectangle_optimized(idx, region)
92
93
+ if rest:
94
+ img = img[*rest]
95
96
# remove the first operation since we already used it
97
oplist = oplist[1:]
0 commit comments