From 68329030ca87020122f5733dd28ec087cdc739c5 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 22 Jun 2026 12:29:15 +0200 Subject: [PATCH 1/3] Update reshape docstring to clarify --- dpnp/dpnp_array.py | 4 ++-- dpnp/dpnp_iface_manipulation.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dpnp/dpnp_array.py b/dpnp/dpnp_array.py index 00401c6c7905..9dbd9bf8467f 100644 --- a/dpnp/dpnp_array.py +++ b/dpnp/dpnp_array.py @@ -2399,8 +2399,8 @@ def transpose(self, *axes): :obj:`dpnp.transpose` : Equivalent function. :obj:`dpnp.ndarray.ndarray.T` : Array property returning the array transposed. - :obj:`dpnp.ndarray.reshape` : Give a new shape to an array without - changing its data. + :obj:`dpnp.ndarray.reshape` : Return a reshaped ndarray without + changing data. Examples -------- diff --git a/dpnp/dpnp_iface_manipulation.py b/dpnp/dpnp_iface_manipulation.py index daf39eb37dac..6ef4400562fb 100644 --- a/dpnp/dpnp_iface_manipulation.py +++ b/dpnp/dpnp_iface_manipulation.py @@ -2951,7 +2951,7 @@ def require(a, dtype=None, requirements=None, *, like=None): def reshape(a, /, shape, order="C", *, copy=None): """ - Gives a new shape to an array without changing its data. + Return a reshaped ndarray without changing data. For full documentation refer to :obj:`numpy.reshape`. From 24cc5ca18a865edf667d4a52d36beccc5d7c12bd Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 22 Jun 2026 12:37:59 +0200 Subject: [PATCH 2/3] Update docstring of reshape() method --- dpnp/dpnp_array.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpnp/dpnp_array.py b/dpnp/dpnp_array.py index 9dbd9bf8467f..c5a85971f473 100644 --- a/dpnp/dpnp_array.py +++ b/dpnp/dpnp_array.py @@ -1768,7 +1768,7 @@ def repeat(self, repeats, axis=None): def reshape(self, /, *shape, order="C", copy=None): """ - Return an array containing the same data with a new shape. + Return a reshaped array without changing data. Refer to :obj:`dpnp.reshape` for full documentation. From 1bf9f0eae6ae5fc9be2a17d3d53efaaed741ecba Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 22 Jun 2026 12:43:01 +0200 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b92406ad7b5..c35592db6294 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ This release is compatible with NumPy 2.5. * Cleaned up Python bindings for indexing functions, renaming `usm_ndarray_take` and `usm_ndarray_put` to `py_take` and `py_put` and refactoring validation [#2935](https://github.com/IntelPython/dpnp/pull/2935) * Updated `dpnp.linalg.eig` and `dpnp.linalg.eigvals` documentation to reflect NumPy's always-complex eigenvalue output for general matrices [#2953](https://github.com/IntelPython/dpnp/pull/2953) * Clarified support for negative axes in `dpnp.transpose`/`dpnp.permute_dims` documentation [#2940](https://github.com/IntelPython/dpnp/pull/2940) +* Clarified the summary in `dpnp.reshape` and `dpnp.ndarray.reshape` docstrings [#2964](https://github.com/IntelPython/dpnp/pull/2964) ### Deprecated