Commit a9f6888
committed
Skip redundant full-image mask on StdShiftIntensity nonzero=False path
On the default nonzero=False path the boolean mask is all-True, so
img[slices] just gathers and scatters the whole image. Shift the image
directly instead, avoiding the mask allocation, .any(), gather and
scatter. Output is unchanged.
Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>1 parent f1dcac4 commit a9f6888
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | 357 | | |
359 | 358 | | |
360 | | - | |
361 | 359 | | |
362 | 360 | | |
363 | | - | |
364 | 361 | | |
365 | 362 | | |
366 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
367 | 366 | | |
368 | 367 | | |
369 | 368 | | |
| |||
0 commit comments