Skip to content

Commit 5297cf3

Browse files
committed
delay fixing windows and 32bit failures
1 parent ccfa77f commit 5297cf3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Diff for: pandas/core/arrays/masked.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
notna,
5858
)
5959

60-
import pandas as pd
6160
from pandas.core import (
6261
algorithms as algos,
6362
arraylike,
@@ -1102,7 +1101,7 @@ def _wrap_reduction_result(self, name: str, result, skipna, **kwargs):
11021101
mask = self._mask.any(axis=axis)
11031102

11041103
return self._maybe_mask_result(result, mask)
1105-
elif result is pd.NA and self.ndim == 2:
1104+
elif result is libmissing.NA and self.ndim == 2:
11061105
result = self._wrap_na_result(name=name, axis=axis)
11071106
return result
11081107
return result

Diff for: pandas/tests/extension/masked_shared.py

+8-7
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)