@@ -1090,3 +1090,22 @@ def test_nanops_independent_of_mask_param(operation):
1090
1090
median_expected = operation (s )
1091
1091
median_result = operation (s , mask = mask )
1092
1092
assert median_expected == median_result
1093
+
1094
+
1095
+ @pytest .mark .parametrize ("min_count" , [- 1 , 0 ])
1096
+ def test_check_below_min_count__negative_or_zero_min_count (min_count ):
1097
+ # GH35227
1098
+ result = nanops .check_below_min_count ((21 , 37 ), None , min_count )
1099
+ expected_result = False
1100
+ assert result == expected_result
1101
+
1102
+
1103
+ @pytest .mark .parametrize (
1104
+ "mask" , [None , np .array ([False , False , True ]), np .array ([True ] + 2244366 * [False ])]
1105
+ )
1106
+ @pytest .mark .parametrize ("min_count, expected_result" , [(1 , False ), (2812191852 , True )])
1107
+ def test_check_below_min_count__positive_min_count (mask , min_count , expected_result ):
1108
+ # shape taken to show that the issue with GH35227 is fixed
1109
+ shape = (2244367 , 1253 )
1110
+ result = nanops .check_below_min_count (shape , mask , min_count )
1111
+ assert result == expected_result
0 commit comments