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
but I might be missing something. Or probably a use_coordinate must be threaded through to get_clean_interp_index (although I am a bit confused by this argument).
The text was updated successfully, but these errors were encountered:
I did encounter this when writing up polyfit! I decided to discard that for the time being, but I believe changing get_clean_interp_index would the best way to fix this.
One would also need to modify polyfit sligthly, though. Here:
When the non-fitted dimensions are stacked together, dim should be renamed to the real dimension of the variable.
I will not have time to make a PR, but it should be quite simple, if anyone has time!
polyfit
currently only allows to fit along a dimension and not along a non-dimension coordinate (or a virtual coordinate)Example:
Output:
Describe the solution you'd like
Would be nice if that worked.
Describe alternatives you've considered
One could just set the non-dimension coordinate as index, e.g.:
da = da.set_index(x="y")
Additional context
Allowing this may be as easy as replacing
xarray/xarray/core/missing.py
Line 248 in 9c85dd5
by
but I might be missing something. Or probably a
use_coordinate
must be threaded through toget_clean_interp_index
(although I am a bit confused by this argument).The text was updated successfully, but these errors were encountered: