code: def _validate_ard_shape(self, name, value, ARD=None):
          
          if ARD is None:
              ARD = np.asarray(value).squeeze().shape != ()
  
          if ARD:
              # accept float or array:
              value = value * np.ones(self.input_dim, dtype=settings.float_type)
  
          if self.input_dim == 1 or not ARD:
              correct_shape = ()
          else:
              correct_shape = (self.input_dim,)
  
          if np.asarray(value).squeeze().shape != correct_shape:
              raise ValueError("shape of {} does not match input_dim".format(name))
  
          return value, ARD
docs: Validates the shape of a potentially ARD hyperparameter
  
          :param name: The name of the parameter (used for error messages)
          :param value: A scalar or an array.
          :param ARD: None, False, or True. If None, infers ARD from shape of value.
          :return: Tuple (value, ARD), where _value_ is a scalar if input_dim==1 or not ARD, array otherwise.
              The _ARD_ is False if input_dim==1 or not ARD, True otherwise.