8000 FIX fix spelling mistake in _NumPyAPIWrapper by glemaitre · Pull Request #26064 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Fil 8000 ter 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
8 changes: 4 additions & 4 deletions sklearn/utils/tests/test_array_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ def test_convert_estimator_to_array_api():
assert hasattr(new_est.X_, "__array_namespace__")


@pytest.mark.parametrize("wrapper", [_ArrayAPIWrapper, _NumPyApiWrapper])
@pytest.mark.parametrize("wrapper", [_ArrayAPIWrapper, _NumPyAPIWrapper])
def test_get_namespace_array_api_isdtype(wrapper):
"""Test isdtype implementation from _ArrayAPIWrapper and _NumPyApiWrapper."""
"""Test isdtype implementation from _ArrayAPIWrapper and _NumPyAPIWrapper."""

if wrapper == _ArrayAPIWrapper:
xp_ = pytest.importorskip("numpy.array_api")
xp = _ArrayAPIWrapper(xp_)
else:
xp = _NumPyApiWrapper()
xp = _NumPyAPIWrapper()

assert xp.isdtype(xp.float32, xp.float32)
assert xp.isdtype(xp.float32, "real floating")
Expand All @@ -219,7 +219,7 @@ def test_get_namespace_array_api_isdtype(wrapper):

assert not xp.isdtype(xp.float32, "complex floating")

if wrapper == _NumPyApiWrapper:
if wrapper == _NumPyAPIWrapper:
assert not xp.isdtype(xp.int8, "complex floating")
assert xp.isdtype(xp.complex64, "complex floating")
assert xp.isdtype(xp.complex128, "complex floating")
Expand Down
0