8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 020cbe8 commit 7a2f907Copy full SHA for 7a2f907
sklearn/utils/tests/test_stats.py
@@ -186,6 +186,14 @@ def test_weighted_percentile_array_api_consistency(
186
187
xp = _array_api_for_tests(array_namespace, device)
188
189
+ # Skip test for percentile=0 edge case (#20528) on namespace/device where
190
+ # xp.nextafter is broken (e.g. torch with MPS device at the time of
191
+ # writing).
192
+ zero = xp.zeros(1, device=device)
193
+ one = xp.ones(1, device=device)
194
+ if percentile == 0 and xp.all(xp.nextafter(zero, one) == zero):
195
+ pytest.xfail(f"xp.nextafter is broken on {device}")
196
+
197
rng = np.random.RandomState(global_random_seed)
198
X_np = data(rng) if callable(data) else data
199
weights_np = weights(rng) if callable(weights) else weights
0 commit comments