Skip to content

Commit b272936

Browse files
Make shape parameter non-default in dpnp.reshape()
1 parent 5240ea6 commit b272936

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

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)