Skip to content

FIX fix spelling mistake in _NumPyAPIWrapper #26064

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 1 commit into from
Apr 3, 2023
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
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