docstr: Rounds a discrete variable by selecting the closest point in the domain
  Assumes an 1d array with a single element as an input.
docstr_tok: ["Rounds","a","discrete","variable","by","selecting","the","closest","point","in","the","domain","Assumes","an","1d","array","with","a","single","element","as","an","input","."]
code: 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]
  
imports: import numpy
  from copy import deepcopy
  from ..errors import InvalidConfigError
label_desc: Use image node_id 5 for calling the DiscreteVariable obj's underlying member method code with example usage: obj.round(value_array) and returns: list