code: def _candidates_from_grid(self, n=1000):
          
          used_vectors = set(tuple(v) for v in self.X)
  
          # if every point has been used before, gridding is done.
          grid_size = self.grid_width ** len(self.tunables)
          if len(used_vectors) == grid_size:
              return None
  
          all_vectors = set(itertools.product(*self._grid_axes))
          remaining_vectors = all_vectors - used_vectors
          candidates = np.array(list(map(np.array, remaining_vectors)))
  
          np.random.shuffle(candidates)
          return candidates[0:n]
docs: Get unused candidates from the grid or parameters.