Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions xarray/computation/nanops.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ def _nanmean_ddof_object(ddof, value, axis=None, dtype=None, **kwargs):
"""In house nanmean. ddof argument will be used in _nanvar method"""
valid_count = count(value, axis=axis)
value = fillna(value, 0)
# As dtype inference is impossible for object dtype, we assume float
# https://github.com/dask/dask/issues/3162
if dtype is None and value.dtype.kind == "O":
dtype = float

data = np.sum(value, axis=axis, dtype=dtype, **kwargs)
data = data / (valid_count - ddof)
Expand Down
Loading