Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify sorting of individuals in mu_plus_lambda #169

Conversation

jakobj
Copy link
Member

@jakobj jakobj commented Jul 1, 2020

My brain was getting too hot whenever i looked at this function. Isn't this implementation much easier? It seems that we can handle the replacement nan -> -np.inf on the fly in the function used for key, no need for creating a copy of the population which we modify and then argsort.

@jakobj jakobj added the maintenance Fighting the second law label Jul 1, 2020
@jakobj jakobj added this to the 0.2.0 milestone Jul 1, 2020
@jakobj jakobj requested a review from mschmidt87 July 1, 2020 20:24
Copy link
Member

@mschmidt87 mschmidt87 left a comment

Choose a reason for hiding this comment

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

Looks good and much simpler, just a minor suggestion for the docstring.

cgp/ea/mu_plus_lambda.py Outdated Show resolved Hide resolved
@jakobj jakobj force-pushed the maint/refactor-mu-plus-lambda-sort branch from 291d89b to 2042586 Compare July 3, 2020 16:48
@jakobj jakobj force-pushed the maint/refactor-mu-plus-lambda-sort branch from 2042586 to 9a13d85 Compare July 3, 2020 17:05
Copy link
Member

@mschmidt87 mschmidt87 left a comment

Choose a reason for hiding this comment

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

LGTM

@mschmidt87 mschmidt87 merged commit 69dd1ca into Happy-Algorithms-League:master Jul 4, 2020
@jakobj jakobj deleted the maint/refactor-mu-plus-lambda-sort branch July 5, 2020 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Fighting the second law
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants