code: def fill_noncontinous_variables(self, samples):
          
          init_points_count = samples.shape[0]
  
          for (idx, var) in enumerate(self.space.space_expanded):
              if isinstance(var, DiscreteVariable) or isinstance(var, CategoricalVariable) :
                  sample_var = np.atleast_2d(np.random.choice(var.domain, init_points_count))
                  samples[:,idx] = sample_var.flatten()
  
              # sample in the case of bandit variables
              elif isinstance(var, BanditVariable):
                  # Bandit variable is represented by a several adjacent columns in the samples array
                  idx_samples = np.random.randint(var.domain.shape[0], size=init_points_count)
                  bandit_idx = np.arange(idx, idx + var.domain.shape[1])
                  samples[:, bandit_idx] = var.domain[idx_samples,:]
docs: Fill sample values to non-continuous variables in place