From 0a03b3f855c9a6b1d6f70ccec0ea7d9add42105e Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Tue, 13 Jan 2026 04:38:00 -0800 Subject: [PATCH] Remove muting DeprecationWarning raised in numpy.bincount --- dpnp/tests/test_histogram.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/dpnp/tests/test_histogram.py b/dpnp/tests/test_histogram.py index a00312af3a5a..6920e2d88032 100644 --- a/dpnp/tests/test_histogram.py +++ b/dpnp/tests/test_histogram.py @@ -23,6 +23,7 @@ has_support_aspect64, numpy_version, ) +from .third_party.cupy import testing class TestDigitize: @@ -610,21 +611,8 @@ def test_minlength(self, array, minlength): result = dpnp.bincount(ia, minlength=minlength) assert_allclose(result, expected) - @pytest.mark.filterwarnings("ignore::DeprecationWarning") - @pytest.mark.parametrize( - "xp", - [ - dpnp, - pytest.param( - numpy, - marks=pytest.mark.xfail( - numpy_version() < "2.3.0", - reason="numpy deprecates but accepts that", - strict=True, - ), - ), - ], - ) + @testing.with_requires("numpy>=2.3.0") + @pytest.mark.parametrize("xp", [dpnp, numpy]) def test_minlength_none(self, xp): a = xp.array([1, 2, 3]) assert_raises_regex(