diff --git a/pymoo/core/mixed.py b/pymoo/core/mixed.py index d49a9b2b..9c547dea 100644 --- a/pymoo/core/mixed.py +++ b/pymoo/core/mixed.py @@ -94,8 +94,11 @@ def _do(self, problem, pop, n_offsprings, parents=False, **kwargs): crossover = self.crossover[clazz] assert crossover.n_parents == XOVER_N_PARENTS and crossover.n_offsprings == XOVER_N_OFFSPRINGS - _parents = [[Individual(X=np.array([parent.X[var] for var in list_of_vars])) for parent in parents] for - parents in pop] + _parents = [ + [Individual(X=np.array([parent.X[var] for var in list_of_vars], dtype="O" if clazz is Choice else None)) + for parent in parents] + for parents in pop + ] _vars = {e: vars[e] for e in list_of_vars} _xl = np.array([vars[e].lb if hasattr(vars[e], "lb") else None for e in list_of_vars])