diff options
author | Mark Harfouche <mark.harfouche@gmail.com> | 2018-09-15 15:34:12 -0400 |
---|---|---|
committer | Mark Harfouche <mark.harfouche@gmail.com> | 2018-09-15 15:34:12 -0400 |
commit | ba0683043e4d60ce931337f221627997339f69e2 (patch) | |
tree | 21039785f72e6593c996f2e75bc8abbe257375e5 /numpy/lib/tests/test_arraypad.py | |
parent | 09ea273d45d26f8d12d4b27c7851e1a4c7180b83 (diff) | |
download | numpy-ba0683043e4d60ce931337f221627997339f69e2.tar.gz |
Don't use None to valid the array as it is the "Default" for empty
Diffstat (limited to 'numpy/lib/tests/test_arraypad.py')
-rw-r--r-- | numpy/lib/tests/test_arraypad.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py index 7318e9ef2..f84319dbf 100644 --- a/numpy/lib/tests/test_arraypad.py +++ b/numpy/lib/tests/test_arraypad.py @@ -504,13 +504,16 @@ class TestConstant(object): 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) + obj_a = object() + arr[0] = obj_a + obj_b = object() + arr = np.pad(arr, pad_width=1, mode='constant', constant_values=obj_b) expected = np.empty((3, ), dtype=object) - expected[...] = obj - expected[1] = None - + expected[0] = obj_b + expected[1] = obj_a + expected[2] = obj_b + assert_array_equal(arr, expected) class TestLinearRamp(object): |