Open xaviernogueira opened 9 months ago
Note: (I can handle this), but in PR #53 as well as via using numpy.select
instead of xarray.where
, we know have process functions in practice outputting numpy.ndarray
s. Therefore typehints will need to be updated again.
Just like this:
def a_process_func(input: np.ndarray) -> np.ndarray:
...
An easy but annoying issue.
Basically all our process functions have incorrect type hints now. I misunderstood
xarray.apply_ufunc
when I made our process functions have thefloat
in/output typehints. For example:Really, these functions are actually passed the a full
xr.DataArray
directly. So we need to update these to:Sorry if this is annoying! Since these are scattered all over I think it's best that we just do it going forward and do a search/replace to easily pick up the old ones.
If you find all "
: float
" and "-> float
" you can replace with ": xr.DataArray
" and "-> xr.DataArray
" respectively. Should only take a few seconds.My bad!