Skip to content

Commit 9cb34ec

Browse files
committed
delay fixing windows and 32bit failures
1 parent 5a65c70 commit 9cb34ec

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pandas/core/arrays/masked.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
notna,
5656
)
5757

58-
import pandas as pd
5958
from pandas.core import (
6059
algorithms as algos,
6160
arraylike,
@@ -1112,7 +1111,7 @@ def _wrap_reduction_result(self, name: str, result, skipna, **kwargs):
11121111
mask = self._mask.any(axis=axis)
11131112

11141113
return self._maybe_mask_result(result, mask)
1115-
elif result is pd.NA and self.ndim == 2:
1114+
elif result is libmissing.NA and self.ndim == 2:
11161115
result = self._wrap_na_result(name=name, axis=axis)
11171116
return result
11181117
return result

pandas/tests/extension/masked_shared.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,19 @@ def check_reduce(self, ser: pd.Series, op_name: str, skipna: bool):
6767
def check_reduce_with_wrap(self, ser: pd.Series, op_name: str, skipna: bool):
6868
if op_name in ["count", "kurt", "sem"]:
6969
pytest.skip(f"{op_name} not an array method")
70+
elif is_platform_windows() or not IS64:
71+
pytest.skip("tests for platform not written yet")
7072

7173
arr = ser.array
7274

73-
float32_cond = arr.dtype == "Float32" or (is_platform_windows() or not IS64)
74-
float_dtype = "Float32" if float32_cond else "Float64"
75-
76-
if op_name in ["mean", "median", "var", "std", "skew"]:
77-
cmp_dtype = float_dtype
75+
if tm.is_float_dtype(arr.dtype):
76+
cmp_dtype = arr.dtype
77+
elif op_name in ["mean", "median", "var", "std", "skew"]:
78+
cmp_dtype = "Float64"
7879
elif op_name in ["max", "min"]:
79-
cmp_dtype = arr.dtype.name
80+
cmp_dtype = arr.dtype
8081
else:
81-
cmp_dtype = {"i": "Int64", "u": "UInt64", "f": float_dtype}[arr.dtype.kind]
82+
cmp_dtype = {"i": "Int64", "u": "UInt64", "f": "Float64"}[arr.dtype.kind]
8283

8384
result = arr._reduce_with_wrap(op_name, skipna=skipna, kwargs={})
8485
if not skipna and ser.isna().any():

0 commit comments

Comments
 (0)