def _check_length(positions):
    if (('axes' in kwargs) and (len(positions) < len(axes))):
        raise ValueError('Length of "coordinates" or "deltas" cannot be less than that of "axes".')
    elif (('axes' not in kwargs) and (len(positions) != len(axes))):
        raise ValueError('Length of "coordinates" or "deltas" must match the number of dimensions of "f" when "axes" is not given.')
def _check_length(positions):
    if (('axes' in kwargs) and (len(positions) < len(axes))):
        raise ValueError('Length of "coordinates" or "deltas" cannot be less than that of "axes".')
    elif (('axes' not in kwargs) and (len(positions) != len(axes))):
        raise ValueError('Length of "coordinates" or "deltas" must match the number of dimensions of "f" when "axes" is not given.')