diff options
Diffstat (limited to 'numpy/lib/tests/test_arraypad.py')
-rw-r--r-- | numpy/lib/tests/test_arraypad.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py index 45d624781..7318e9ef2 100644 --- a/numpy/lib/tests/test_arraypad.py +++ b/numpy/lib/tests/test_arraypad.py @@ -502,6 +502,16 @@ class TestConstant(object): expected = np.full(7, int64_max, dtype=np.int64) assert_array_equal(test, expected) + def test_check_object_array(self): + arr = np.empty(1, dtype=object) + obj = object() + arr = np.pad(arr, pad_width=1, mode='constant', constant_values=obj) + + expected = np.empty((3, ), dtype=object) + expected[...] = obj + expected[1] = None + + assert_array_equal(arr, expected) class TestLinearRamp(object): def test_check_simple(self): |