Skip to content

Commit 8111485

Browse files
MAINT: apply ruff/flake8-simplify rule SIM210
SIM210 Remove unnecessary `True if ... else False`
1 parent 1557a30 commit 8111485

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/lib/_arraypad_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ def pad(array, pad_width, mode='constant', **kwargs):
860860

861861
elif mode in {"reflect", "symmetric"}:
862862
method = kwargs.get("reflect_type", "even")
863-
include_edge = True if mode == "symmetric" else False
863+
include_edge = mode == "symmetric"
864864
for axis, (left_index, right_index) in zip(axes, pad_width):
865865
if array.shape[axis] == 1 and (left_index > 0 or right_index > 0):
866866
# Extending singleton dimension for 'reflect' is legacy

0 commit comments

Comments
 (0)