diff options
author | Mark Harfouche <mark.harfouche@gmail.com> | 2018-09-15 15:35:11 -0400 |
---|---|---|
committer | Mark Harfouche <mark.harfouche@gmail.com> | 2018-09-15 15:35:11 -0400 |
commit | cf9861b3a518edc41643dc6d80ab57336b6d5f35 (patch) | |
tree | 39e3051d054e86f7b634f239ae1091f9dae1aa7c /numpy/lib/tests/test_arraypad.py | |
parent | ba0683043e4d60ce931337f221627997339f69e2 (diff) | |
download | numpy-cf9861b3a518edc41643dc6d80ab57336b6d5f35.tar.gz |
Pad start and end with different values
Diffstat (limited to 'numpy/lib/tests/test_arraypad.py')
-rw-r--r-- | numpy/lib/tests/test_arraypad.py | 8 |
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): |