Switch to T_DataArray and T_Dataset in concat by Illviljan · Pull Request #6784 · pydata/xarray (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is quite endemic to hardcode Dataset / DataArray, rather than use the class of the argument.
We would need to make some widespread changes for this to work correctly — I think that would be welcome. We'd probably need to find a good way to test this across methods too (though maybe mypy could help there?).
And we might need a property of Dataset
for what to class to use when returning a DataArray
, which becomes more complicated.