MIC-DKFZ/HD-BET

incompatible with numpy>=1.25

sh-shahrokhi opened this issue · 4 comments

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,)

@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

My solution was to downgrade to numpy==1.24.1

ah mine too, just found this thread :)

Hey there, fixed it