File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -1068,18 +1068,13 @@ def reduction(
1068
1068
skipna : bool = True ,
1069
1069
mask : npt .NDArray [np .bool_ ] | None = None ,
1070
1070
) -> Dtype :
1071
- dtype = values .dtype
1071
+ if values .size == 0 :
1072
+ return _na_for_min_count (values , axis )
1073
+
1072
1074
values , mask = _get_values (
1073
1075
values , skipna , fill_value_typ = fill_value_typ , mask = mask
1074
1076
)
1075
-
1076
- if (axis is not None and values .shape [axis ] == 0 ) or values .size == 0 :
1077
- dtype_max = _get_dtype_max (dtype )
1078
- result = getattr (values , meth )(axis , dtype = dtype_max )
1079
- result .fill (np .nan )
1080
- else :
1081
- result = getattr (values , meth )(axis )
1082
-
1077
+ result = getattr (values , meth )(axis )
1083
1078
result = _maybe_null_out (result , axis , mask , values .shape )
1084
1079
return result
1085
1080
You can’t perform that action at this time.
0 commit comments