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
(Another potential piece of fat to be trimmed from Calc found while working on #208)
Calc currently has logic for handling when a Var's function consumes numpy arrays rather than xarray.DataArrays. See here. IIRC, the motivation for this was to ease the transition from when we first switched over to a DataArray-based workflow, so that existing functions that used numpy arrays needn't be scrapped. The flag itself is actually an attribute of Var.
However, I have already switched over everything to DataArrays. Does anybody use this? @spencerkclark?
Compared to much of Calc, the logic is actually straightforward, but I still think it fits into the category of non-essential, poorly or not-at-all documented things that I crammed into Calc that would be better off re-implemented properly if/when the need arises. That being said, 100% receptive to keeping it if it's still being used.
(There is also placeholder logic for functions that consume Datasets rather than DataArrays, which likewise seem unnecessary.)
The text was updated successfully, but these errors were encountered:
Yes, by all means remove this! This is quite outdated; I don't use it either. Regardless, with apply_ufunc now in xarray, it is quite straightforward to convert a pure numpy function to one that operates on DataArrays.
(Another potential piece of fat to be trimmed from Calc found while working on #208)
Calc
currently has logic for handling when aVar
's function consumes numpy arrays rather than xarray.DataArrays. See here. IIRC, the motivation for this was to ease the transition from when we first switched over to a DataArray-based workflow, so that existing functions that used numpy arrays needn't be scrapped. The flag itself is actually an attribute of Var.However, I have already switched over everything to DataArrays. Does anybody use this? @spencerkclark?
Compared to much of Calc, the logic is actually straightforward, but I still think it fits into the category of non-essential, poorly or not-at-all documented things that I crammed into
Calc
that would be better off re-implemented properly if/when the need arises. That being said, 100% receptive to keeping it if it's still being used.(There is also placeholder logic for functions that consume Datasets rather than DataArrays, which likewise seem unnecessary.)
The text was updated successfully, but these errors were encountered: