loli / medpy

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

Update datatypes for Numpy 1.24 #113

Closed StellarStorm closed 7 months ago

StellarStorm commented 1 year ago

Numpy 1.24 deprecated

Attempting to run MedPy raised an AttributeError that these weren't installed (I found this for metrics.hd95) This replaces them with np.bool_, int, and float, respectively, so medpy can continue to work with the latest Numpy.

EDIT: casts into a specific precision, such as np.float32, were not modified.

ZhiweiYan-96 commented 1 year ago

Any plans for this PR to merged : )? Seems it blocks numpy>1.23

StellarStorm commented 11 months ago

@ZhiweiYan-96 ~for the time being, you can run pip install git+https://github.com/StellarStorm/medpy.git@numpy_dtypes~

EDIT: with this now merged, pip install git+https://github.com/loli/medpy.git is the preferred way to install until a new release is out!

harshamarupudi56 commented 8 months ago

I made a PR due to the bool issue, didn't realize int and float were returning issues as well. Should probably just merge this PR to master.