Skip to content

Commit 28850c6

Browse files
Merge master into depr_T_non_2dim
2 parents a2ec192 + d99fa65 commit 28850c6

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
3737
* Refactored `dpnp.fft` and `dpnp.random` submodules by removing wildcard imports and defining explicit public exports [#2649](https://github.com/IntelPython/dpnp/pull/2649)
3838
* Added support for the `out` keyword to accept a tuple, bringing ufunc signatures into alignment with those in NumPy [#2664](https://github.com/IntelPython/dpnp/pull/2664)
3939
* Unified public API definitions in `dpnp.linalg` and `dpnp.scipy` submodules [#2663](https://github.com/IntelPython/dpnp/pull/2663)
40+
* Aligned the signature of `dpnp.reshape` function with Python array API by making `shape` a required argument [#2673](https://github.com/IntelPython/dpnp/pull/2673)
4041

4142
### Deprecated
4243

dpnp/dpnp_iface_manipulation.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,7 +3013,7 @@ def require(a, dtype=None, requirements=None, *, like=None):
30133013
return arr
30143014

30153015

3016-
def reshape(a, /, shape=None, order="C", *, copy=None):
3016+
def reshape(a, /, shape, order="C", *, copy=None):
30173017
"""
30183018
Gives a new shape to an array without changing its data.
30193019
@@ -3028,8 +3028,6 @@ def reshape(a, /, shape=None, order="C", *, copy=None):
30283028
an integer, then the result will be a 1-D array of that length.
30293029
One shape dimension can be -1. In this case, the value is
30303030
inferred from the length of the array and remaining dimensions.
3031-
3032-
Default: ``None``.
30333031
order : {None, "C", "F", "A"}, optional
30343032
Read the elements of `a` using this index order, and place the
30353033
elements into the reshaped array using this index order. ``"C"``
@@ -3113,11 +3111,6 @@ def reshape(a, /, shape=None, order="C", *, copy=None):
31133111
31143112
"""
31153113

3116-
if shape is None:
3117-
raise TypeError(
3118-
"reshape() missing 1 required positional argument: 'shape'"
3119-
)
3120-
31213114
if order is None:
31223115
order = "C"
31233116
elif order in "aA":

0 commit comments

Comments
 (0)