MCPcopy
hub / github.com/scikit-learn/scikit-learn / test_nan_reductions

Function test_nan_reductions

sklearn/utils/tests/test_array_api.py:434–442  ·  view source on GitHub ↗

Check NaN reductions like _nanmin and _nanmax

(library, X, reduction, expected)

Source from the content-addressed store, hash-verified

432 ],
433)
434def test_nan_reductions(library, X, reduction, expected):
435 """Check NaN reductions like _nanmin and _nanmax"""
436 xp = pytest.importorskip(library)
437
438 with config_context(array_api_dispatch=True):
439 result = reduction(xp.asarray(X))
440
441 result = move_to(result, xp=numpy, device="cpu")
442 assert_allclose(result, expected)
443
444
445@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

config_contextFunction · 0.90
move_toFunction · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…