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

Enable deepcopy for ExpData(View) #2189

Closed
dweindl opened this issue Nov 14, 2023 · 0 comments · Fixed by #2196
Closed

Enable deepcopy for ExpData(View) #2189

dweindl opened this issue Nov 14, 2023 · 0 comments · Fixed by #2196
Assignees

Comments

@dweindl
Copy link
Member

dweindl commented Nov 14, 2023

deepcopy(ExpDataView(...)) only creates a shallow copy.

deepcopy(ExpData(...)) is currently not possible (TypeError: cannot pickle 'SwigPyObject' object). Copy-ctor works, but it's less pythonic.

@dweindl dweindl self-assigned this Nov 15, 2023
dweindl added a commit that referenced this issue Nov 15, 2023
Fixes a bug in SwigPtrView.__deepcopy__ which did not produce a deep copy.

Add SwigPtrView.__eq__ to allow for comparison. The view objects are considered
equal if the underlying viewed objects are equal.

Fixes #2189.
dweindl added a commit that referenced this issue Nov 15, 2023
Fixes a bug in SwigPtrView.__deepcopy__ which did not produce a deep copy.

Add SwigPtrView.__eq__ to allow for comparison. The view objects are considered
equal if the underlying viewed objects are equal.

Fixes #2189.
@dweindl dweindl linked a pull request Nov 20, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant