summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorHan Genuit <hangenuit@gmail.com>2012-09-07 01:57:24 +0200
committerHan Genuit <hangenuit@gmail.com>2012-09-07 02:01:52 +0200
commit1e6f7a7db94afc69f88ebf0b0235888dc377ce25 (patch)
treebbd56448e3ff25f4dd2344acd02f1540cfa0ed8b /numpy/lib/tests/test_function_base.py
parent926564c195d30542312123b7d76fe091c3453881 (diff)
downloadnumpy-1e6f7a7db94afc69f88ebf0b0235888dc377ce25.tar.gz
TST: Add extra test for multidimensional inserts.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index 7c1b01345..b619a3ffe 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -147,6 +147,13 @@ class TestInsert(TestCase):
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])
+ def test_multidim(self):
+ a = [[1, 1, 1]]
+ r = [[2, 2, 2],
+ [1, 1, 1]]
+ assert_equal(insert(a, 0, [2, 2, 2], axis=0), r)
+ assert_equal(insert(a, 0, 2, axis=0), r)
+ assert_equal(insert(a, 2, 2, axis=1), [[1, 1, 2, 1]])
class TestAmax(TestCase):
def test_basic(self):