<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_candidates(self, n=1000):
 """Generate random hyperparameter vectors Args: n (int, optional):
 number of candidates to generate. Defaults to 1000. Returns: candidates (np.array):
 Array of candidate hyperparameter vectors with shape (n_samples, len(tunables)) """

        # If using a grid, generate a list of previously unused grid points
        if self.grid:
            return self._candidates_from_grid(n)

        # If not using a grid, generate a list of vectors where each parameter
        # is chosen uniformly at random
        else:
            return self._random_candidates(n)