diff options
author | Loftie Ellis <lpellis@gmail.com> | 2012-07-10 17:20:53 -0400 |
---|---|---|
committer | Eric Fode <ericfode@gmail.com> | 2012-07-15 00:19:17 -0400 |
commit | 2c04244da264cb1665d6162ae119d2f05ad65150 (patch) | |
tree | be94c58ea3b2e9cd5449f097d28a819242d8f826 /numpy/lib/tests | |
parent | 143fb1874b3ff3875a93accad3e87056a44d77d0 (diff) | |
download | numpy-2c04244da264cb1665d6162ae119d2f05ad65150.tar.gz |
BUG: Ticket #808: Insert was not performing properly when an integer was
the argument passed to be used as the item to be insterted, and a list was
passed as the positions. This was fixed by simply duplicating the item to
be inserted so that it was a list of equal length and then control was
passed to the already exsisting code to handel this case
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 95b32e47c..2ed6e7edd 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -145,7 +145,8 @@ class TestInsert(TestCase): assert_equal(insert(a, 0, 1), [1, 1, 2, 3]) assert_equal(insert(a, 3, 1), [1, 2, 3, 1]) assert_equal(insert(a, [1, 1, 1], [1, 2, 3]), [1, 1, 2, 3, 2, 3]) - + assert_equal(insert(a, 1,[1,2,3]), [1, 1, 2, 3, 2, 3]) + assert_equal(insert(a,[1,2,3],9),[1,9,2,9,3,9]) class TestAmax(TestCase): def test_basic(self): |