Rounds a discrete variable by selecting the closest point in the domain
        Assumes an 1d array with a single element as an input.

def round(self, value_array):
        """
        Rounds a discrete variable by selecting the closest point in the domain
        Assumes an 1d array with a single element as an input.
        """
        value = value_array[0]
        rounded_value = self.domain[0]

        for domain_value in self.domain:
            if np.abs(domain_value - value) < np.abs(rounded_value - value):
                rounded_value = domain_value

        return [rounded_value]