1010 IS64 ,
1111 is_platform_windows ,
1212)
13+ from pandas .compat .numpy import np_version_gt2
1314import pandas .util ._test_decorators as td
1415
1516import pandas as pd
3233 nanops ,
3334)
3435
36+ is_windows_np2_or_is32 = (is_platform_windows () and not np_version_gt2 ) or not IS64
3537is_windows_or_is32 = is_platform_windows () or not IS64
3638
3739
@@ -1766,13 +1768,13 @@ def test_df_empty_min_count_1(self, opname, dtype, exp_dtype):
17661768 @pytest .mark .parametrize (
17671769 "opname, dtype, exp_value, exp_dtype" ,
17681770 [
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" )),
17721774 ("sum" , "Int64" , 0 , "Int64" ),
17731775 ("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" )),
17761778 ("sum" , "UInt64" , 0 , "UInt64" ),
17771779 ("prod" , "UInt64" , 1 , "UInt64" ),
17781780 ("sum" , "Float32" , 0 , "Float32" ),
@@ -1787,6 +1789,8 @@ def test_df_empty_nullable_min_count_0(self, opname, dtype, exp_value, exp_dtype
17871789 expected = Series ([exp_value , exp_value ], dtype = exp_dtype )
17881790 tm .assert_series_equal (result , expected )
17891791
1792+ # TODO: why does min_count=1 impact the resulting Windows dtype
1793+ # differently than min_count=0?
17901794 @pytest .mark .parametrize (
17911795 "opname, dtype, exp_dtype" ,
17921796 [
0 commit comments