Open TomNicholas opened 1 month ago
I have had similar thoughts.
The non-inplace version is currently spelled DataTree.copy()
. But the name is not so intuitive.
Something like tree['child'].orphan(inherit=False)
would be much cleaner than tree['child'].copy(inherit=False)
.
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