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

Add copy/deepcopy semantics for DiploidPopulation #770

Merged
merged 3 commits into from Jun 14, 2021

Conversation

molpopgen
Copy link
Owner

@molpopgen molpopgen commented Jun 14, 2021

A naive copy.copy/deepcopy does not do the right thing. This PR adds the magic functions to both base and sub classes. Only the deep copy function does a deep copy of the table. The copy function simply copies the underlying shared_ptr.

@molpopgen molpopgen merged commit 21eae98 into dev Jun 14, 2021
@molpopgen molpopgen deleted the copy_deepcopy_DiploidPopulation branch June 14, 2021 23:43
molpopgen added a commit that referenced this pull request Jul 5, 2021
* Add copy/deepcopy to DiploidPopulation

* Update DiploidPopulation docstring.

* Update change log (and fix missing link to #764).
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.

None yet

1 participant