Skip to content

Fix use metric_kwargs in check_array_api_metric_pairwise #29045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions sklearn/metrics/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1898,12 +1898,24 @@ def check_array_api_metric_pairwise(metric, array_namespace, device, dtype_name)
if "dense_output" in signature(metric).parameters:
metric_kwargs["dense_output"] = False
check_array_api_metric(
metric, array_namespace, device, dtype_name, a_np=X_np, b_np=Y_np
metric,
array_namespace,
device,
dtype_name,
a_np=X_np,
b_np=Y_np,
**metric_kwargs,
)
metric_kwargs["dense_output"] = True

check_array_api_metric(
metric, array_namespace, device, dtype_name, a_np=X_np, b_np=Y_np
metric,
array_namespace,
device,
dtype_name,
a_np=X_np,
b_np=Y_np,
**metric_kwargs,
)


Expand Down
Loading