diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-08-18 12:40:49 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-27 07:26:56 -0600 |
commit | 73be11db794d115a7d9bd2e822c0d8008bc14a28 (patch) | |
tree | 4029a8a8160d6e4692ed69eed244aafab8deaa46 /numpy/lib/tests/test_shape_base.py | |
parent | c8732958c8e07f2306029dfde2178faf9c01d049 (diff) | |
download | numpy-73be11db794d115a7d9bd2e822c0d8008bc14a28.tar.gz |
BUG: Some bugs in squeeze and concatenate found by testing SciPy
Diffstat (limited to 'numpy/lib/tests/test_shape_base.py')
-rw-r--r-- | numpy/lib/tests/test_shape_base.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_shape_base.py b/numpy/lib/tests/test_shape_base.py index 9d6cd0551..56178e8af 100644 --- a/numpy/lib/tests/test_shape_base.py +++ b/numpy/lib/tests/test_shape_base.py @@ -258,6 +258,13 @@ class TestSqueeze(TestCase): assert_array_equal(squeeze(b),reshape(b,(20,10,20))) assert_array_equal(squeeze(c),reshape(c,(20,10))) + # Squeezing to 0-dim should still give an ndarray + a = [[[1.5]]] + res = squeeze(a) + assert_equal(res, 1.5) + assert_equal(res.ndim, 0) + assert_equal(type(res), ndarray) + class TestKron(TestCase): def test_return_type(self): |