Skip to content

Conversation

shoyer
Copy link
Member

@shoyer shoyer commented Sep 23, 2020

Intended to fix #4449

The goal is to restore behavior to match what we had prior to #4379 for all types of data other than np.ndarray objects

Needs tests!

  • Closes #xxxx
  • Tests added
  • Passes isort . && black . && mypy . && flake8
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

@max-sixty
Copy link
Collaborator

Great, this is simpler.

PandasIndexingAdaptor loses its .copy method, but I don't think that's pubic API.


return cls(first_var.dims, data, attrs)

def copy(self, deep=True, data=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we keep this but use self.__copy__ under the hood?

It lines up well with Dataset.copy() and DataArray.copy()

@pep8speaks
Copy link

Hello @shoyer! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 1:1: F401 'copy' imported but unused

@jhamman
Copy link
Member

jhamman commented Sep 14, 2023

I believe this is no longer an issue. Please re-open if there's more to do here.

@jhamman jhamman closed this Sep 14, 2023
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.

Did copy(deep=True) break with 0.16.1?

5 participants