def bounds_check(values, lower, upper):
    """Perform a simple bounds check on an array.

    :param values: an array of values.
    :param lower: the lower bound of the valid range.
    :param upper: the upper bound of the valid range.

    :type values: array[float]
    :type lower: float
    :type upper: float

    :returns: mask - a boolean array that is True when values is between lower and upper.
    :rtype: array[bool]
    """
    
    mask = (values >= lower) & (values <= upper)
    
    return mask