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

Dataset.copy docstring matches behavior #2491

Merged
merged 1 commit into from
Oct 23, 2018

Conversation

georgegeddes
Copy link
Contributor

@georgegeddes georgegeddes commented Oct 17, 2018

This makes the docstring of Dataset.copy match the actual behavior.

However, I noticed that DataArray.copy has the opposite behavior for the deep keyword. Is this intentional, or are they supposed to behave the same way?

@pep8speaks
Copy link

Hello @georgegeddes! Thanks for submitting the PR.

@shoyer
Copy link
Member

shoyer commented Oct 18, 2018

thanks for catching this!

I'm trying to remember if there is any good reason for these methods having different defaults....

I suppose it could make sense if Dataset.copy() is modeled off dict.copy() (which does shallow copies) and DataArray.copy() is modeled off numpy.ndarray.copy() (which does deep copies).

@dcherian dcherian merged commit 6008dc4 into pydata:master Oct 23, 2018
@dcherian
Copy link
Contributor

Thanks!

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.

4 participants