-
Notifications
You must be signed in to change notification settings - Fork 10
MAINT: various backports and tweaks #146
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran pixi update. Notably this bumps dask to 2025.2.0.
report.exclude_also = [ | ||
'\.\.\.', | ||
'if TYPE_CHECKING:', | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused large sections of code to be incorrectly skipped
@@ -33,7 +33,7 @@ def in1d( | |||
https://github.com/numpy/numpy/blob/v1.26.0/numpy/lib/arraysetops.py#L524-L758 | |||
""" | |||
if xp is None: | |||
xp = _compat.array_namespace(x1, x2) | |||
xp = array_namespace(x1, x2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this causes coverage to fail, as this line isn't covered by unit tests
@@ -5,6 +5,7 @@ | |||
# To be changed to a Protocol later (see data-apis/array-api#589) | |||
Array = Any # type: ignore[no-any-explicit] | |||
Device = Any # type: ignore[no-any-explicit] | |||
DType = Any # type: ignore[no-any-explicit] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pytest.fixture(params=[Backend.DASK]) # Can select the test with `pytest -k dask` | ||
def da( | ||
request: pytest.FixtureRequest, monkeypatch: pytest.MonkeyPatch | ||
) -> ModuleType: # numpydoc ignore=PR01,RT01 | ||
"""Variant of the `xp` fixture that only yields dask.array.""" | ||
xp = pytest.importorskip("dask.array") | ||
xp = array_namespace(xp.empty(0)) | ||
patch_lazy_xp_functions(request, monkeypatch, xp=xp) | ||
return xp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Various generic improvements backported from #141 and #86