loli / medpy

Medical image processing in Python
http://loli.github.io/medpy/
GNU General Public License v3.0
559 stars 136 forks source link

Fix numpy slicing #107

Closed Erotemic closed 7 months ago

Erotemic commented 1 year ago

In numpy 1.23.1 (or sooner, I didn't bisect it) using lists to slice is no longer allowed. It gives the error message:

IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

This PR fixes it by casting to a tuple being using as a slice.

StellarStorm commented 7 months ago

Merged, thank you!