Skip to content

Conversation

@vlad-perevezentsev
Copy link
Contributor

This PR suggests raising a DeprecationWarning when out is passed positionally to dpnp.minimum and dpnp.maximum.
Align with NumPy 2.4

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

@github-actions
Copy link
Contributor

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

@coveralls
Copy link
Collaborator

coveralls commented Nov 10, 2025

Coverage Status

coverage: 81.407% (+0.006%) from 81.401%
when pulling 19f0889 on deprecated_out_arg
into 6f6855b on master.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2025

Array API standard conformance tests for dpnp=0.20.0dev0=py313h509198e_56 ran successfully.
Passed: 1229
Failed: 0
Skipped: 7

with pytest.raises(ValueError):
getattr(dpnp, func)(a, b, out=out)

@pytest.mark.filterwarnings("ignore::DeprecationWarning")
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to pass out=out to mitigate that issue rather than muting warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

numpy.minimum(q,w,out=())
ValueError: The 'out' tuple must have exactly one entry per ufunc output

numpy.minimum(q,w,out=(1,2))
ValueError: The 'out' tuple must have exactly one entry per ufunc output

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