summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_arraypad.py
diff options
context:
space:
mode:
authorPim de Haan <pimdehaan@gmail.com>2018-06-20 17:43:27 -0700
committerPim de Haan <pimdehaan@gmail.com>2018-06-21 12:44:13 -0700
commit626210fb67bb6cc92ca4d25d90bea5110ba3a026 (patch)
treead58728b0fcf8f041330f75d5b26be737c32971d /numpy/lib/tests/test_arraypad.py
parentcd731d5cdbac143b9de5e188b74e03514d3c73b8 (diff)
downloadnumpy-626210fb67bb6cc92ca4d25d90bea5110ba3a026.tar.gz
TST: Added regression test for #11395
Diffstat (limited to 'numpy/lib/tests/test_arraypad.py')
-rw-r--r--numpy/lib/tests/test_arraypad.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py
index 8ba0370b0..45d624781 100644
--- a/numpy/lib/tests/test_arraypad.py
+++ b/numpy/lib/tests/test_arraypad.py
@@ -1009,6 +1009,21 @@ class TestUnicodeInput(object):
assert_array_equal(a, b)
+class TestObjectInput(object):
+ def test_object_input(self):
+ # Regression test for issue gh-11395.
+ a = np.full((4, 3), None)
+ pad_amt = ((2, 3), (3, 2))
+ b = np.full((9, 8), None)
+ modes = ['edge',
+ 'symmetric',
+ 'reflect',
+ 'wrap',
+ ]
+ for mode in modes:
+ assert_array_equal(pad(a, pad_amt, mode=mode), b)
+
+
class TestValueError1(object):
def test_check_simple(self):
arr = np.arange(30)