We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6108ec commit bad377dCopy full SHA for bad377d
pandas/tests/arrays/integer/test_arithmetic.py
@@ -274,7 +274,7 @@ def test_cross_type_arithmetic():
274
275
276
@pytest.mark.parametrize("op", ["mean"])
277
-def test_reduce_to_float(op):
+def test_reduce_to_float(op, using_python_scalars):
278
# some reduce ops always return float, even if the result
279
# is a rounded number
280
df = pd.DataFrame(
@@ -287,7 +287,10 @@ def test_reduce_to_float(op):
287
288
# op
289
result = getattr(df.C, op)()
290
- assert type(result) == float
+ if using_python_scalars:
291
+ assert type(result) == float
292
+ else:
293
+ assert isinstance(result, np.float64)
294
295
# groupby
296
result = getattr(df.groupby("A"), op)()
0 commit comments