code: def test_round_optimum_shapes(self):
      space = [
          {
              "name": "var1",
              "type": "continuous",
              "domain": (-1, 1),
              "dimensionality": 1,
          }
      ]
  
      with self.assertRaises(ValueError):
          design_space = Design_space(space)
          design_space.round_optimum([[[0.0]]])
  
      with self.assertRaises(ValueError):
          design_space = Design_space(space)
          design_space.round_optimum(np.array([[[0.0]]]))
  
      with self.assertRaises(ValueError):
          design_space = Design_space(space)
          design_space.round_optimum(np.array([[0.0], [2.0]]))
  
      # Next couple of tests are intentionally very simple
      # as they just verify that exception is not thrown for the given input shape
      design_space = Design_space(space)
  
      rounded = design_space.round_optimum([0.0])
      self.assertEqual(rounded[0], 0.0)
  
      rounded = design_space.round_optimum(np.array([0.0]))
      self.assertEqual(rounded[0], 0.0)
  
      rounded = design_space.round_optimum([[0.0]])
      self.assertEqual(rounded[0], 0.0)
  
      rounded = design_space.round_optimum(np.array([[0.0]]))
      self.assertEqual(rounded[0], 0.0)
  
imports: import numpy
  import unittest
  from GPyOpt.core.task.space import Design_space
  from GPyOpt.core.task.variables import BanditVariable, DiscreteVariable, CategoricalVariable, ContinuousVariable
  from GPyOpt.core.errors import InvalidConfigError
label_desc: Use image node_id 26 for calling the TestDesignSpace obj's underlying member method code with example usage: obj.test_round_optimum_shapes() without return types