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 7a754f7 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

assert dpnp.allclose(result, expected)


@testing.with_requires("numpy>=2.4")
Copy link
Contributor

Choose a reason for hiding this comment

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

need to mute warning in the tests:

dpnp/tests/test_binary_ufuncs.py: 10 warnings
  /localdisk/work/antonvol/miniforge3/envs/dpnp_dev/lib/python3.13/unittest/case.py:238: DeprecationWarning: Passing more than 2 positional arguments is deprecated. If you meant to use the third argument as an output, use the `out` keyword argument instead.
    callable_obj(*args, **kwargs)

dpnp/tests/test_sycl_queue.py: 18 warnings
  /localdisk/work/antonvol/code/dpnp/dpnp/tests/test_sycl_queue.py:1040: DeprecationWarning: `dpnp.asfarray` is deprecated, and will be removed in a future release. Please use `dpnp.asarray` with an appropriate dtype instead.
    dpnp_data = getattr(dpnp, func)(data, device=device)

dpnp/tests/test_usm_type.py::test_array_copy[device-device-asfarray]
dpnp/tests/test_usm_type.py::test_array_copy[device-shared-asfarray]
dpnp/tests/test_usm_type.py::test_array_copy[device-host-asfarray]
dpnp/tests/test_usm_type.py::test_array_copy[shared-device-asfarray]
dpnp/tests/test_usm_type.py::test_array_copy[shared-shared-asfarray]
dpnp/tests/test_usm_type.py::test_array_copy[shared-host-asfarray]
dpnp/tests/test_usm_type.py::test_array_copy[host-device-asfarray]
dpnp/tests/test_usm_type.py::test_array_copy[host-shared-asfarray]
dpnp/tests/test_usm_type.py::test_array_copy[host-host-asfarray]
  /localdisk/work/antonvol/code/dpnp/dpnp/tests/test_usm_type.py:299: DeprecationWarning: `dpnp.asfarray` is deprecated, and will be removed in a future release. Please use `dpnp.asarray` with an appropriate dtype instead.
    y = getattr(dpnp, func)(x, usm_type=usm_type_y)

Copy link
Contributor

Choose a reason for hiding this comment

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

still need to mute:

dpnp/tests/test_binary_ufuncs.py: 10 warnings
  /localdisk/work/antonvol/miniforge3/envs/dpnp_dev/lib/python3.13/unittest/case.py:238: DeprecationWarning: Passing more than 2 positional arguments is deprecated. If you meant to use the third argument as an output, use the `out` keyword argument instead.
    callable_obj(*args, **kwargs)

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