From ee8090bc5a357fb9258e27131dc76f9d39e7a795 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 18 Jun 2026 14:28:50 +0200 Subject: [PATCH 1/5] Removed dpnp.row_stack in favor of dpnp.vstack --- dpnp/__init__.py | 2 -- dpnp/dpnp_iface_manipulation.py | 6 ------ 2 files changed, 8 deletions(-) diff --git a/dpnp/__init__.py b/dpnp/__init__.py index d2ea158d4d4..38a210af472 100644 --- a/dpnp/__init__.py +++ b/dpnp/__init__.py @@ -217,7 +217,6 @@ roll, rollaxis, rot90, - row_stack, shape, size, split, @@ -720,7 +719,6 @@ "roll", "rollaxis", "rot90", - "row_stack", "shape", "size", "split", diff --git a/dpnp/dpnp_iface_manipulation.py b/dpnp/dpnp_iface_manipulation.py index 14a190993ed..daf39eb37da 100644 --- a/dpnp/dpnp_iface_manipulation.py +++ b/dpnp/dpnp_iface_manipulation.py @@ -4606,9 +4606,6 @@ def vstack(tup, *, dtype=None, casting="same_kind"): """ Stack arrays in sequence vertically (row wise). - :obj:`dpnp.row_stack` is an alias for :obj:`dpnp.vstack`. - They are the same function. - For full documentation refer to :obj:`numpy.vstack`. Parameters @@ -4670,6 +4667,3 @@ def vstack(tup, *, dtype=None, casting="same_kind"): if not isinstance(arrs, list): arrs = [arrs] return dpnp.concatenate(arrs, axis=0, dtype=dtype, casting=casting) - - -row_stack = vstack From 1ce77d645ad5e556ba087b12eb69c32a40c542e7 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 18 Jun 2026 14:29:40 +0200 Subject: [PATCH 2/5] Clean up the documentation --- doc/reference/array-manipulation.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/reference/array-manipulation.rst b/doc/reference/array-manipulation.rst index 70a4fa790e5..0490119dd29 100644 --- a/doc/reference/array-manipulation.rst +++ b/doc/reference/array-manipulation.rst @@ -95,7 +95,6 @@ Joining arrays hstack dstack column_stack - row_stack Splitting arrays From 9f6238d701f89a2538443b21b6b06d5df906a67c Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 18 Jun 2026 14:30:00 +0200 Subject: [PATCH 3/5] Mute affected third party tests --- .../cupy/manipulation_tests/test_join.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py b/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py index 838bb3646c1..af561d6cf26 100644 --- a/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py +++ b/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py @@ -526,7 +526,7 @@ def test_stack_casting(self, xp, dtype1, dtype2, casting): # may raise TypeError or ComplexWarning return xp.stack((a, b), dtype=dtype2, casting=casting) - @pytest.mark.filterwarnings("ignore::DeprecationWarning") + @pytest.mark.skip("row_stack removed in favor of vstack") @testing.with_requires("numpy>=2.0") @testing.for_all_dtypes(name="dtype1") @testing.for_all_dtypes(name="dtype2") @@ -535,22 +535,26 @@ def test_row_stack(self, xp, dtype1, dtype2): a = testing.shaped_arange((4, 3), xp, dtype1) b = testing.shaped_arange((3,), xp, dtype2) c = testing.shaped_arange((2, 3), xp, dtype1) - return xp.row_stack((a, b, c)) + with pytest.warns(DeprecationWarning): + return xp.row_stack((a, b, c)) + @pytest.mark.skip("row_stack removed in favor of vstack") def test_row_stack_wrong_ndim1(self): a = cupy.zeros(()) b = cupy.zeros((3,)) - with pytest.raises(ValueError): # pytest.warns(DeprecationWarning): + with pytest.raises(ValueError), pytest.warns(DeprecationWarning): cupy.row_stack((a, b)) + @pytest.mark.skip("row_stack removed in favor of vstack") def test_row_stack_wrong_ndim2(self): a = cupy.zeros((3, 2, 3)) b = cupy.zeros((3, 2)) - with pytest.raises(ValueError): # pytest.warns(DeprecationWarning): + with pytest.raises(ValueError), pytest.warns(DeprecationWarning): cupy.row_stack((a, b)) + @pytest.mark.skip("row_stack removed in favor of vstack") def test_row_stack_wrong_shape(self): a = cupy.zeros((3, 2)) b = cupy.zeros((4, 3)) - with pytest.raises(ValueError): # pytest.warns(DeprecationWarning): + with pytest.raises(ValueError), pytest.warns(DeprecationWarning): cupy.row_stack((a, b)) From 3f7dadc8d5c9c151bb186d50957faf15dda608f1 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 18 Jun 2026 14:35:51 +0200 Subject: [PATCH 4/5] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f98f0f4108..441c41239a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ This release is compatible with NumPy 2.5. ### Removed * Removed support for arrays of 2-dimensional vectors in `dpnp.cross`, which now requires (arrays of) 3-dimensional vectors and raises `ValueError` otherwise [#2950](https://github.com/IntelPython/dpnp/pull/2950) +* Removed `dpnp.row_stack` in favor of `dpnp.vstack` [#2956](https://github.com/IntelPython/dpnp/pull/2956) ### Fixed From 1ec96b047bf572ed7184b8610e8354b424ce0ac2 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 18 Jun 2026 15:45:31 +0200 Subject: [PATCH 5/5] Removed skipped third party tests per review comment --- .../cupy/manipulation_tests/test_join.py | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py b/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py index af561d6cf26..9e8a6b027e8 100644 --- a/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py +++ b/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py @@ -525,36 +525,3 @@ def test_stack_casting(self, xp, dtype1, dtype2, casting): b = testing.shaped_arange((3, 4), xp, dtype1) # may raise TypeError or ComplexWarning return xp.stack((a, b), dtype=dtype2, casting=casting) - - @pytest.mark.skip("row_stack removed in favor of vstack") - @testing.with_requires("numpy>=2.0") - @testing.for_all_dtypes(name="dtype1") - @testing.for_all_dtypes(name="dtype2") - @testing.numpy_cupy_array_equal(type_check=has_support_aspect64()) - def test_row_stack(self, xp, dtype1, dtype2): - a = testing.shaped_arange((4, 3), xp, dtype1) - b = testing.shaped_arange((3,), xp, dtype2) - c = testing.shaped_arange((2, 3), xp, dtype1) - with pytest.warns(DeprecationWarning): - return xp.row_stack((a, b, c)) - - @pytest.mark.skip("row_stack removed in favor of vstack") - def test_row_stack_wrong_ndim1(self): - a = cupy.zeros(()) - b = cupy.zeros((3,)) - with pytest.raises(ValueError), pytest.warns(DeprecationWarning): - cupy.row_stack((a, b)) - - @pytest.mark.skip("row_stack removed in favor of vstack") - def test_row_stack_wrong_ndim2(self): - a = cupy.zeros((3, 2, 3)) - b = cupy.zeros((3, 2)) - with pytest.raises(ValueError), pytest.warns(DeprecationWarning): - cupy.row_stack((a, b)) - - @pytest.mark.skip("row_stack removed in favor of vstack") - def test_row_stack_wrong_shape(self): - a = cupy.zeros((3, 2)) - b = cupy.zeros((4, 3)) - with pytest.raises(ValueError), pytest.warns(DeprecationWarning): - cupy.row_stack((a, b))