Should `DataTree.orphan` act in-place?
Open
Nobody has claimed this yet.
API design
topic-DataTree
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
What is your issue?
DataTree.orphan remove the parent node from a tree, but modifies in-place. It has no return value, so it's already consistent with #9196. But it's not obvious to me whether or not the method should return a modified copy instead.
came up here https://github.com/pydata/xarray/pull/9666#discussion_r1815592203
cc @keewis @shoyer
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DataTree.orphan entry point and read the discussion in PR #9666, then compare the question with issue #9196. Done means a maintainer decision on whether orphan mutates in place or returns a modified copy, with the chosen behavior documented and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100