Skip to content

Fix dpnp.__all__ missing ndarray and __array_namespace_info__ - #3100

Merged
antonwolfy merged 1 commit into
masterfrom
fix-dpnp-all
Oct 15, 2026
Merged

antonwolfy merged 1 commit into
masterfrom
fix-dpnp-all

Conversation

@antonwolfy

Copy link
Copy Markdown
Contributor

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.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

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 antonwolfy self-assigned this Oct 14, 2026
@antonwolfy antonwolfy added this to the 0.21.0 release milestone Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@github-actions

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev14=np2py314h8d9cdd5_5 ran successfully.
Passed: 1376
Failed: 0
Skipped: 6

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 82.613%. remained the same — fix-dpnp-all into master

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you @antonwolfy

@antonwolfy
antonwolfy merged commit 11427b7 into master Oct 15, 2026
110 of 113 checks passed
@antonwolfy
antonwolfy deleted the fix-dpnp-all branch October 15, 2026 17:00
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants