def find_mid_point_vertebral_level(data):

    vertebral_levels = np.zeros(int(np.amax(data)))
    for i in range((int(np.amin(data))+1),(int(np.amax(data))+1)):
    
        #finding the co-ordinates of voxels in each level 
        x,y,z = np.where(data==i)
        z = np.sort(z)
        vertebral_levels[1-i] = np.amin(z) + round((np.amax(z)-np.amin(z))/2)
    return vertebral_levels

#==================================================================================
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/dev/spinal_level/sct_extract_spinal_levels.py/find_mid_point_vertebral_level/swapped operands of `-`