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

confused by reference to dataset in docs for xarray.DataArray.copy #3606

Closed
klindsay28 opened this issue Dec 9, 2019 · 2 comments · Fixed by #4245
Closed

confused by reference to dataset in docs for xarray.DataArray.copy #3606

klindsay28 opened this issue Dec 9, 2019 · 2 comments · Fixed by #4245

Comments

@klindsay28
Copy link

The documentation for xarray.DataArray.copy

If deep=True, a deep copy is made of the data array. Otherwise, a shallow copy is made, so each variable in the new array’s dataset is also a variable in this array’s dataset.

I do not understand what dataset is being referred to here. In particular, there are no xarray datasets in the examples provided in this documentation. Could someone provide clarification?

@dcherian
Copy link
Contributor

dcherian commented Dec 9, 2019

Thanks @klindsay28

We should delete "'s dataset" from that line. The deep kwarg controls whether you get a deep or shallow copy of the variables in the data array (i.e. both coordinate variables and the data variable).

@klindsay28
Copy link
Author

How about

If deep=True, a deep copy is made of the data array. Otherwise, a shallow copy is made, and the returned data array's values are a new view of this data array's values.

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.

2 participants