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
One messy thing is that it appears that assignment via .coords is broken on DataTree even at main.
Ah yes - I forgot there's a TODO deep somewhere for that 😅 I left it for later because it seemed like it might require changing the DatasetCoordinates class that ds.coords returns. (Surely that class could just be replaced by the new xr.Coordinates class now??)
I'm trying to have a go at this but it's made harder by #9203 not being implemented. The problem is that the DatasetCoordinates class works by storing the Dataset object as ._data, then altering it in-place by altering ._data._variables and ._data._coord_names. But the same approach doesn't work for DataTree because that uses ._data_variables and ._coord_variables internally, so you can't get away with just passing the DataTree object to the DatasetCoordinates constructor, even though conceptually that should work.
So to make it work right now requires a new DataTreeCoordinates object. That's fine, but if #9203 were completed then we wouldn't really need that new class.
Ah yes - I forgot there's a TODO deep somewhere for that 😅 I left it for later because it seemed like it might require changing the
DatasetCoordinates
class thatds.coords
returns. (Surely that class could just be replaced by the newxr.Coordinates
class now??)Originally posted by @TomNicholas in #9063 (comment)
The text was updated successfully, but these errors were encountered: