improved nan treatment on summing #132
Labels
enhancement
New feature or request
priority: high
High priority issue: prioritize and solve as soon as possible
Milestone
Is your feature request related to a problem? Please describe.
When using ds.pr.sum with
skipna=True
on data which contains NaN the result is currently 0 if all data points summed over are nan. I usually need functionality where the result is NaN when all input are NaN but if there are one or more non-NaN values the result is the sum of the non-NaN values .Describe the solution you'd like
Use
min_count=1
in the call of ds.sum (in the definition of ds.pr.sum) whenskipna=True
.Alternatives
Always pass min_count=1 to ds.pr.sum when using it.
Would there be any problems in existing functionality when introducing this change @mikapfl ?
The text was updated successfully, but these errors were encountered: