diff options
author | Oliver Eberle <oliver_eberle@web.de> | 2015-02-19 15:24:47 +0100 |
---|---|---|
committer | Oliver Eberle <oliver_eberle@web.de> | 2015-02-19 15:35:09 +0100 |
commit | a5ea773e66110cf335c9ed37e8ccdc14f8e56764 (patch) | |
tree | ac3d7f2dcdb0876fbdb57417bd0d11a77432bc21 /numpy/lib/tests/test_shape_base.py | |
parent | d770034969e35907e7497d5fe9053df4bdac2fd2 (diff) | |
download | numpy-a5ea773e66110cf335c9ed37e8ccdc14f8e56764.tar.gz |
BUG: Fixed issue #4679 and added test
Tile now copies the input when it is a numpy array and all dimensions are
repeated only once.
Diffstat (limited to 'numpy/lib/tests/test_shape_base.py')
-rw-r--r-- | numpy/lib/tests/test_shape_base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_shape_base.py b/numpy/lib/tests/test_shape_base.py index 23f3edfbe..fb9d7f364 100644 --- a/numpy/lib/tests/test_shape_base.py +++ b/numpy/lib/tests/test_shape_base.py @@ -324,6 +324,12 @@ class TestTile(TestCase): assert_equal(tile(b, (2, 2)), [[1, 2, 1, 2], [3, 4, 3, 4], [1, 2, 1, 2], [3, 4, 3, 4]]) + def test_tile_one_repetition_on_array_gh4679(self): + a = np.arange(5) + b = tile(a, 1) + b += 2 + assert_equal(a, np.arange(5)) + def test_empty(self): a = np.array([[[]]]) d = tile(a, (3, 2, 5)).shape |