MIC-DKFZ / HD-BET

MRI brain extraction tool
Apache License 2.0
255 stars 61 forks source link

incompatible with numpy>=1.25 #45

Closed sh-shahrokhi closed 11 months ago

sh-shahrokhi commented 1 year ago

Hello,

HD-BET does not work if it is installed alongside numpy >= 1.25

File "/home/mambaforge/envs/img/lib/site-packages/HD_BET/data_loading.py", line 87, in save_segmentation_nifti
    if np.any(np.array(seg_old_size) != np.array(dct['size'])[[2, 1, 0]]):
ValueError: operands could not be broadcast together with shapes (117,171,171) (3,)
mrunibe commented 1 year ago

@FabianIsensee The comparison always returned true and now raises an error since numpy-1.25 (see '(gh-22707)' in https://numpy.org/doc/stable/release/1.25.0-notes.html#expired-deprecations).

Fixed by #47

roohy466 commented 12 months ago

My solution was to downgrade to numpy==1.24.1

neuronflow commented 11 months ago

ah mine too, just found this thread :)

FabianIsensee commented 11 months ago

Hey there, fixed it