Rather than 'len(np.shape(cut_coords)) == 0', I think that I would prefer 'isinstance(cut_coords, numbers.Number)'.