8000 BUG: constant padding expected wrong type in constant_values · charris/numpy@32f8393 · GitHub
[go: up one dir, main page]

Skip to content

Commit 32f8393

Browse files
chiffacharris
authored andcommitted
BUG: constant padding expected wrong type in constant_values
Constant padding on 4 sides of a 2d array expected a numpy ndarray, and not a ndarray like (tuple, list, ...) Detailed description is in the issue numpy#7353
1 parent 77d911f commit 32f8393

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/lib/arraypad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ def _normalize_shape(ndarray, shape, cast_to_int=True):
10521052
arr = arr.repeat(2, axis=1)
10531053
elif arr.shape[0] == ndims:
10541054
# Input correctly formatted, pass it on as `arr`
1055-
arr = shape
1055+
pass
10561056
else:
10571057
fmt = "Unable to create correctly shaped tuple from %s"
10581058
raise ValueError(fmt % (shape,))

0 commit comments

Comments
 (0)
0