@@ -1090,3 +1090,21 @@ 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
+ result = nanops .check_below_min_count ((21 , 37 ), None , min_count )
1098
+ expected_result = False
1099
+ assert result == expected_result
1100
+
1101
+
1102
+ @pytest .mark .parametrize (
1103
+ "mask" , [None , np .array ([False , False , True ]), np .array ([True ] + 2244366 * [False ])]
1104
+ )
1105
+ @pytest .mark .parametrize ("min_count, expected_result" , [(1 , False ), (2812191852 , True )])
1106
+ def test_check_below_min_count__positive_min_count (mask , min_count , expected_result ):
1107
+ # shape taken to show that the issue with GH35227 is fixed
1108
+ shape = (2244367 , 1253 )
1109
+ result = nanops .check_below_min_count (shape , mask , min_count )
1110
+ assert result == expected_result
0 commit comments