summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Harfouche <mark.harfouche@gmail.com>2018-09-15 15:35:11 -0400
committerMark Harfouche <mark.harfouche@gmail.com>2018-09-15 15:35:11 -0400
commitcf9861b3a518edc41643dc6d80ab57336b6d5f35 (patch)
tree39e3051d054e86f7b634f239ae1091f9dae1aa7c
parentba0683043e4d60ce931337f221627997339f69e2 (diff)
downloadnumpy-cf9861b3a518edc41643dc6d80ab57336b6d5f35.tar.gz
Pad start and end with different values
-rw-r--r--numpy/lib/tests/test_arraypad.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py
index f84319dbf..3fe064ea4 100644
--- a/numpy/lib/tests/test_arraypad.py
+++ b/numpy/lib/tests/test_arraypad.py
@@ -507,13 +507,15 @@ class TestConstant(object):
obj_a = object()
arr[0] = obj_a
obj_b = object()
- arr = np.pad(arr, pad_width=1, mode='constant', constant_values=obj_b)
+ obj_c = object()
+ arr = np.pad(arr, pad_width=1, mode='constant',
+ constant_values=(obj_b, obj_c))
expected = np.empty((3, ), dtype=object)
expected[0] = obj_b
expected[1] = obj_a
- expected[2] = obj_b
-
+ expected[2] = obj_c
+
assert_array_equal(arr, expected)
class TestLinearRamp(object):