diff --git a/CHANGELOG.md b/CHANGELOG.md index 5162e4fcdfb6..f10f4421dcce 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 diff --git a/doc/reference/array-manipulation.rst b/doc/reference/array-manipulation.rst index 70a4fa790e5f..0490119dd295 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 diff --git a/dpnp/__init__.py b/dpnp/__init__.py index d2ea158d4d44..38a210af472f 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 14a190993edc..daf39eb37dac 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 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 838bb3646c1e..9e8a6b027e85 100644 --- a/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py +++ b/dpnp/tests/third_party/cupy/manipulation_tests/test_join.py @@ -525,32 +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.filterwarnings("ignore::DeprecationWarning") - @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) - return xp.row_stack((a, b, c)) - - 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)) - - 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)) - - 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))