summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test_function_base.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index ba6b336ff..af85be326 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -1025,6 +1025,24 @@ class TestMeshgrid(TestCase):
[5, 5, 5],
[6, 6, 6],
[7, 7, 7]])))
+ def test_indexing(self):
+ [X, Y] = meshgrid([1, 2, 3], [4, 5, 6, 7], indexing='ij')
+ assert_(all(X == array([[1, 1, 1, 1],
+ [2, 2, 2, 2],
+ [3, 3, 3, 3]])))
+ assert_(all(Y == array([[4, 5, 6, 7],
+ [4, 5, 6, 7],
+ [4, 5, 6, 7]])))
+
+ def test_sparse(self):
+ [X, Y] = meshgrid([1, 2, 3], [4, 5, 6, 7], sparse=True)
+ assert_(all(X == array([[1, 2, 3]])))
+ assert_(all(Y == array([[4],
+ [5],
+ [6],
+ [7]])))
+
+
class TestPiecewise(TestCase):