You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today we discussed how there are a bunch of methods for DataTree that are implemented using the somewhat sketchy approach of taking the equivalent method from Dataset, then applying it using map_over_subtree. Because there are so many of these methods, and they are ultimately just syntactic sugar that saves the user about 3 lines of code each, these were originally implemented in xarray-contrib/datatree without tests.
We decided that it would be safer to disable these methods for now, and then add them back in as we double-check that they actually work / write unit tests for them. The logic being that it would be less painful to just force users to write out their loops over the tree in early versions than it would be for our new inheritance model to break the method in some subtle way without anyone realizing.
Some very important methods we will try to get into the first release (particularly isel/sel and arithmetic).
The code with the lists of methods to be disabled is here
What is your issue?
Today we discussed how there are a bunch of methods for DataTree that are implemented using the somewhat sketchy approach of taking the equivalent method from
Dataset
, then applying it usingmap_over_subtree
. Because there are so many of these methods, and they are ultimately just syntactic sugar that saves the user about 3 lines of code each, these were originally implemented inxarray-contrib/datatree
without tests.We decided that it would be safer to disable these methods for now, and then add them back in as we double-check that they actually work / write unit tests for them. The logic being that it would be less painful to just force users to write out their loops over the tree in early versions than it would be for our new inheritance model to break the method in some subtle way without anyone realizing.
Some very important methods we will try to get into the first release (particularly
isel
/sel
and arithmetic).The code with the lists of methods to be disabled is here
https://github.com/pydata/xarray/blob/main/xarray/core/datatree_ops.py
cc @shoyer, @flamingbear, @kmuehlbauer, @owenlittlejohns , @castelao, @keewis
The text was updated successfully, but these errors were encountered: