save_segmentation_nifti was comparing the entire segmentation array to target size. Prior numpy-1.25 this returned always false and a swallowed deprecation warning. Raises an error since numpy-1.25:
File "HD-BET/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,)
fixes #45 by comparing current shape to target shape.
save_segmentation_nifti was comparing the entire segmentation array to target size. Prior numpy-1.25 this returned always false and a swallowed deprecation warning. Raises an error since numpy-1.25: File "HD-BET/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,)
fixes #45 by comparing current shape to target shape.