10
10
IS64 ,
11
11
is_platform_windows ,
12
12
)
13
+ from pandas .compat .numpy import np_version_gt2
13
14
import pandas .util ._test_decorators as td
14
15
15
16
import pandas as pd
32
33
nanops ,
33
34
)
34
35
36
+ is_windows_np2_or_is32 = (is_platform_windows () and not np_version_gt2 ) or not IS64
35
37
is_windows_or_is32 = is_platform_windows () or not IS64
36
38
37
39
@@ -1767,13 +1769,13 @@ def test_df_empty_min_count_1(self, opname, dtype, exp_dtype):
1767
1769
@pytest .mark .parametrize (
1768
1770
"opname, dtype, exp_value, exp_dtype" ,
1769
1771
[
1770
- ("sum" , "Int8" , 0 , ("Int32" if is_windows_or_is32 else "Int64" )),
1771
- ("prod" , "Int8" , 1 , ("Int32" if is_windows_or_is32 else "Int64" )),
1772
- ("prod" , "Int8" , 1 , ("Int32" if is_windows_or_is32 else "Int64" )),
1772
+ ("sum" , "Int8" , 0 , ("Int32" if is_windows_np2_or_is32 else "Int64" )),
1773
+ ("prod" , "Int8" , 1 , ("Int32" if is_windows_np2_or_is32 else "Int64" )),
1774
+ ("prod" , "Int8" , 1 , ("Int32" if is_windows_np2_or_is32 else "Int64" )),
1773
1775
("sum" , "Int64" , 0 , "Int64" ),
1774
1776
("prod" , "Int64" , 1 , "Int64" ),
1775
- ("sum" , "UInt8" , 0 , ("UInt32" if is_windows_or_is32 else "UInt64" )),
1776
- ("prod" , "UInt8" , 1 , ("UInt32" if is_windows_or_is32 else "UInt64" )),
1777
+ ("sum" , "UInt8" , 0 , ("UInt32" if is_windows_np2_or_is32 else "UInt64" )),
1778
+ ("prod" , "UInt8" , 1 , ("UInt32" if is_windows_np2_or_is32 else "UInt64" )),
1777
1779
("sum" , "UInt64" , 0 , "UInt64" ),
1778
1780
("prod" , "UInt64" , 1 , "UInt64" ),
1779
1781
("sum" , "Float32" , 0 , "Float32" ),
@@ -1788,6 +1790,8 @@ def test_df_empty_nullable_min_count_0(self, opname, dtype, exp_value, exp_dtype
1788
1790
expected = Series ([exp_value , exp_value ], dtype = exp_dtype )
1789
1791
tm .assert_series_equal (result , expected )
1790
1792
1793
+ # TODO: why does min_count=1 impact the resulting Windows dtype
1794
+ # differently than min_count=0?
1791
1795
@pytest .mark .parametrize (
1792
1796
"opname, dtype, exp_dtype" ,
1793
1797
[
0 commit comments