Assigns fitnesses to particles that are within bounds.

def _update_pop(self, pop_size):
        """Assigns fitnesses to particles that are within bounds."""
        valid_particles = []
        invalid_particles = []
        for part in self.population:
            if any(x > 1 or x < -1 for x in part):
                invalid_particles.append(part)
            else:
                valid_particles.append(part)
        self._model_count += len(valid_particles)
        for part in valid_particles:
            self.update_particle(part)
        self.assign_fitnesses(valid_particles)
        for part in valid_particles:
            if part.fitness > part.best.fitness:
                part.best = creator.Particle(part)
                part.best.fitness = part.fitness
        for part in invalid_particles:
            self.update_particle(part)
        self.population[:] = valid_particles + invalid_particles
        self.population.sort(key=lambda x: x.ident)  # shouldn't need to sort?
        return