Skip to content

Commit c990a0d

Browse files
committed
silence errors
1 parent 15dab16 commit c990a0d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pandas/tests/extension/masked_shared.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ def check_reduce_with_wrap(self, ser: pd.Series, op_name: str, skipna: bool):
6969
pytest.skip(f"{op_name} not an array method")
7070

7171
arr = ser.array
72-
float_dtype = "Float32" if arr.dtype == "Float32" else "Float64"
72+
73+
float32_cond = arr.dtype == "Float32" and not is_platform_windows()
74+
float_dtype = "Float32" if float32_cond else "Float64"
7375

7476
if op_name in ["mean", "median", "var", "std", "skew"]:
7577
cmp_dtype = float_dtype
7678
elif op_name in ["max", "min"]:
77-
cmp_dtype = arr.dtype
79+
cmp_dtype = arr.dtype.name
7880
else:
7981
cmp_dtype = {"i": "Int64", "u": "UInt64", "f": float_dtype}[arr.dtype.kind]
8082

pandas/tests/extension/test_arrow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,10 @@ def check_reduce_with_wrap(self, ser: pd.Series, op_name: str, skipna: bool):
513513
kwargs = {"ddof": 1} if op_name in ["var", "std"] else {}
514514

515515
if op_name in ["max", "min"]:
516-
cmp_dtype = arr.dtype
516+
cmp_dtype = arr.dtype.name
517517
elif arr.dtype.name == "decimal128(7, 3)[pyarrow]":
518518
if op_name not in ["median", "var", "std"]:
519-
cmp_dtype = arr.dtype
519+
cmp_dtype = arr.dtype.name
520520
else:
521521
cmp_dtype = "float64[pyarrow]"
522522
elif op_name in ["median", "var", "std", "mean", "skew"]:

0 commit comments

Comments
 (0)