Skip to content

Add ndmax keyword to dpnp.array - #3044

Draft
antonwolfy wants to merge 2 commits into
masterfrom
task/SAT-8215
Draft

Add ndmax keyword to dpnp.array#3044
antonwolfy wants to merge 2 commits into
masterfrom
task/SAT-8215

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

NumPy 2.4.0 added a new ndmax keyword to numpy.array. This PR aligns dpnp.array with that signature.

  • 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?

Align dpnp.array with NumPy 2.4.0, which added an ndmax keyword. The
truncating behavior of ndmax produces object-dtype arrays, which USM
arrays cannot represent, so ndmax is accepted only with its default
value 0 and raises NotImplementedError otherwise.
@antonwolfy antonwolfy added this to the 0.21.0 release milestone Aug 26, 2026
@antonwolfy antonwolfy self-assigned this Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev6=py314ha0e2e8e_18 ran successfully.
Passed: 1375
Failed: 0
Skipped: 7

An explicit ndmax=0 makes NumPy cap the result at zero dimensions and
raise, so it cannot serve as a test baseline. Compare dpnp's no-op
ndmax=0 against NumPy's no-op (ndmax >= ndim) and gate the test on
numpy>=2.4, where the ndmax keyword is available.
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.

1 participant