Repository navigation
Fix dpnp.__all__ missing ndarray and __array_namespace_info__ - #3100
Merged
Merged
Conversation
The data types block reassigned __all__ instead of extending it, which dropped the two names listed before it. Also remove mean, median and min from the mathematical functions block; they are listed with statistics, where they are imported.
antonwolfy
requested review from
ndgrigorian and
vlad-perevezentsev
as code owners
October 14, 2026 19:14
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/index.html |
Contributor
|
Array API standard conformance tests for dpnp=0.21.0dev14=np2py314h8d9cdd5_5 ran successfully. |
Collaborator
vlad-perevezentsev
approved these changes
Oct 15, 2026
vlad-perevezentsev
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Thank you @antonwolfy
github-actions Bot
added a commit
that referenced
this pull request
Oct 15, 2026
…3100) `dpnp.__all__` was missing `ndarray` and `__array_namespace_info__`: the data types block in `dpnp/__init__.py` reassigned `__all__` with `=` instead of extending it with `+=`, which dropped the two names listed just before it. As a result, `from dpnp import *` did not import `ndarray`. `mean`, `median` and `min` were also listed twice, in both the mathematical functions and statistics blocks. They are now listed only with statistics, where they are imported (and where `max` already is). A new `dpnp/tests/test_public_api.py` checks that `__all__` has no duplicates, that every name resolves, and that both names are present. Three of its four tests fail without the fix. 11427b7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dpnp.__all__was missingndarrayand__array_namespace_info__: the data types block indpnp/__init__.pyreassigned__all__with=instead of extending it with+=, which dropped the two names listed just before it. As a result,from dpnp import *did not importndarray.mean,medianandminwere also listed twice, in both the mathematical functions and statistics blocks. They are now listed only with statistics, where they are imported (and wheremaxalready is).A new
dpnp/tests/test_public_api.pychecks that__all__has no duplicates, that every name resolves, and that both names are present. Three of its four tests fail without the fix.