We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdcfcbe commit 8477d63Copy full SHA for 8477d63
sklearn/metrics/tests/test_pairwise_distances_reduction.py
@@ -228,8 +228,10 @@ def _non_trivial_radius(
228
# on average. Yielding too many results would make the test slow (because
229
# checking the results is expensive for large result sets), yielding 0 most
230
# of the time would make the test useless.
231
- if precomputed_dists is None and metric is None:
232
- raise ValueError("Either metric or dists must be provided")
+ assert (
+ precomputed_dists is not None or metric is not None
233
+ ), "Either metric or precomputed_dists must be provided."
234
+
235
if precomputed_dists is None:
236
assert X is not None
237
assert Y is not None
0 commit comments