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

Skip to content

Commit 3db32cb

Browse files
committed
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 #7353
1 parent 8f64328 commit 3db32cb

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