summaryrefslogtreecommitdiff
path: root/numpy/core/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/tests')
-rw-r--r--numpy/core/tests/test_shape_base.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/core/tests/test_shape_base.py b/numpy/core/tests/test_shape_base.py
index c6399bb07..c387bc616 100644
--- a/numpy/core/tests/test_shape_base.py
+++ b/numpy/core/tests/test_shape_base.py
@@ -172,6 +172,7 @@ class TestVstack(TestCase):
desired = array([[1, 2], [1, 2]])
assert_array_equal(res, desired)
+
def test_concatenate_axis_None():
a = np.arange(4, dtype=np.float64).reshape((2, 2))
b = list(range(3))
@@ -188,6 +189,18 @@ def test_concatenate_axis_None():
assert_array_equal(r, d)
+def test_large_concatenate_axis_None():
+ # When no axis is given, concatenate uses flattened versions.
+ # This also had a bug with many arrays (see gh-5979).
+ x = np.arange(1, 100)
+ r = np.concatenate(x, None)
+ assert_array_equal(x, r)
+
+ # This should probably be deprecated:
+ r = np.concatenate(x, 100) # axis is >= MAXDIMS
+ assert_array_equal(x, r)
+
+
def test_concatenate():
# Test concatenate function
# No arrays raise ValueError