Skip to content

Fix for cxOnePointLeafBiased and python 3.11#733

Open
harwoodr wants to merge 2 commits into
DEAP:masterfrom
harwoodr:master
Open

Fix for cxOnePointLeafBiased and python 3.11#733
harwoodr wants to merge 2 commits into
DEAP:masterfrom
harwoodr:master

Conversation

@harwoodr

Copy link
Copy Markdown

Changes in python's random module require a minor change for cxOnePointLeafBiased.

fix for cxOnePointLeafBiased and python 3.11
Fix for cxOnePointLeafBiased and python 3.11
@stonebig

stonebig commented Jan 6, 2024

Copy link
Copy Markdown

it would be nice to have deap for Python-3.11 and Python-3.12

@EvolSched EvolSched left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, why not change "random.sample(common_types, 1)[0]" directly to "random.choice(list(common_types))", just like in the cxOnePoint() function? This is more efficient.

@Ashrockzzz2003

Copy link
Copy Markdown
Contributor

#762 optimizes it like how you suggested @EvolSched. Created a new PR as this one was stale for 6+ months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants