-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
_indexes of DataArray are not deep copied #3899
Comments
toddrjen
added a commit
to toddrjen/xarray
that referenced
this issue
Mar 27, 2020
From a quick look maybe we do |
My pull request #3871 has a fix already. |
toddrjen
added a commit
to toddrjen/xarray
that referenced
this issue
Mar 29, 2020
max-sixty
pushed a commit
that referenced
this issue
Mar 29, 2020
* drop numpy 1.12 compat code that can hide other errors * deep copy _indexes (#3899) * implement idxmax and idxmin
Closed by #3871 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
DataArray.copy
, the_indexes
attributes is not deep copied. After pull request #3840, this causes deleting a coordinate of a copy will also delete that coordinate from the original, even for deep copies.MCVE Code Sample
The result is:
Expected Output
The test should pass.
Problem Description
Doing a deep copy should make a copy of everything. Changing a deep copy should not alter the original in any way.
The text was updated successfully, but these errors were encountered: