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.
1 parent f440ffb commit 3932893Copy full SHA for 3932893
wkcuber/downsampling.py
@@ -360,14 +360,14 @@ def _mode(x):
360
slices = [slice(None)] * ndim
361
slices[axis] = slice(1, None)
362
# Reshape and compute final counts
363
- counts = counts.reshape(shape).transpose(transpose)[slices] + 1
+ counts = counts.reshape(shape).transpose(transpose)[tuple(slices)] + 1
364
365
# Find maximum counts and return modals/counts
366
slices = [slice(None, i) for i in sort.shape]
367
del slices[axis]
368
index = np.ogrid[slices]
369
index.insert(axis, np.argmax(counts, axis=axis))
370
- return sort[index]
+ return sort[tuple(index)]
371
372
373
def downsample_cube(cube_buffer, factors, interpolation_mode):
0 commit comments