If value falls within bounds, just return it
        otherwise return min or max, whichever is closer to the value
        Assumes an 1d array with a single element as an input.

def round(self, value_array):
        """
        If value falls within bounds, just return it
        otherwise return min or max, whichever is closer to the value
        Assumes an 1d array with a single element as an input.
        """

        min_value = self.domain[0]
        max_value = self.domain[1]

        rounded_value = value_array[0]
        if rounded_value < min_value:
            rounded_value = min_value
        elif rounded_value > max_value:
            rounded_value = max_value

        return [rounded_value]