Skip to content

Commit

Permalink
more reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Nov 20, 2021
1 parent 0f94bec commit 19d82cd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xarray/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,19 @@ def _reduce_method(cls, func: Callable, include_skipna: bool, numeric_only: bool

def wrapped_func(self, dim=None, skipna=None, **kwargs):
return self.reduce(
func, dim, skipna=skipna, numeric_only=numeric_only, **kwargs
func=func,
dim=dim,
skipna=skipna,
numeric_only=numeric_only,
**kwargs,
)

else:

def wrapped_func(self, dim=None, **kwargs): # type: ignore[misc]
return self.reduce(func, dim, numeric_only=numeric_only, **kwargs)
return self.reduce(
func=func, dim=dim, numeric_only=numeric_only, **kwargs
)

return wrapped_func

Expand Down

0 comments on commit 19d82cd

Please sign in to comment.