-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
In #4219 we added ndrolling.
However, nanreduce, such as ds.rolling(x=3, y=2).mean()
calls np.nanmean
which copies the strided-array into a full-array.
This is memory-inefficient.
We can implement inhouse-nanreduce methods for the strided array.
For example, our .nansum
currently does
make a strided array -> copy the array -> replace nan by 0 -> sum
but we can do instead
replace nan by 0 -> make a strided array -> sum
This is much more memory efficient.