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
@@ -1766,13 +1768,13 @@ def test_df_empty_min_count_1(self, opname, dtype, exp_dtype):
1766
1768
@pytest .mark .parametrize (
1767
1769
"opname, dtype, exp_value, exp_dtype" ,
1768
1770
[
1769
- ("sum" , "Int8" , 0 , ("Int32" if is_windows_or_is32 else "Int64" )),
1770
- ("prod" , "Int8" , 1 , ("Int32" if is_windows_or_is32 else "Int64" )),
1771
- ("prod" , "Int8" , 1 , ("Int32" if is_windows_or_is32 else "Int64" )),
1771
+ ("sum" , "Int8" , 0 , ("Int32" if is_windows_np2_or_is32 else "Int64" )),
1772
+ ("prod" , "Int8" , 1 , ("Int32" if is_windows_np2_or_is32 else "Int64" )),
1773
+ ("prod" , "Int8" , 1 , ("Int32" if is_windows_np2_or_is32 else "Int64" )),
1772
1774
("sum" , "Int64" , 0 , "Int64" ),
1773
1775
("prod" , "Int64" , 1 , "Int64" ),
1774
- ("sum" , "UInt8" , 0 , ("UInt32" if is_windows_or_is32 else "UInt64" )),
1775
- ("prod" , "UInt8" , 1 , ("UInt32" if is_windows_or_is32 else "UInt64" )),
1776
+ ("sum" , "UInt8" , 0 , ("UInt32" if is_windows_np2_or_is32 else "UInt64" )),
1777
+ ("prod" , "UInt8" , 1 , ("UInt32" if is_windows_np2_or_is32 else "UInt64" )),
1776
1778
("sum" , "UInt64" , 0 , "UInt64" ),
1777
1779
("prod" , "UInt64" , 1 , "UInt64" ),
1778
1780
("sum" , "Float32" , 0 , "Float32" ),
@@ -1787,6 +1789,8 @@ def test_df_empty_nullable_min_count_0(self, opname, dtype, exp_value, exp_dtype
1787
1789
expected = Series ([exp_value , exp_value ], dtype = exp_dtype )
1788
1790
tm .assert_series_equal (result , expected )
1789
1791
1792
+ # TODO: why does min_count=1 impact the resulting Windows dtype
1793
+ # differently than min_count=0?
1790
1794
@pytest .mark .parametrize (
1791
1795
"opname, dtype, exp_dtype" ,
1792
1796
[
0 commit comments