diff options
author | Denis Alevi <mail@denisalevi.de> | 2016-02-27 03:59:26 +0100 |
---|---|---|
committer | Eren Sezener <erensezener@gmail.com> | 2016-03-20 14:41:40 +0100 |
commit | 7c76ef7ea3adbd9c70a08ee39fdf1b56fb940b3b (patch) | |
tree | 0ba0a9824993f010493d4c6549edbda72fc1ef83 /numpy/lib/tests/test_twodim_base.py | |
parent | e7de401f5c9634a2a63eb8f44f2193be1a946191 (diff) | |
download | numpy-7c76ef7ea3adbd9c70a08ee39fdf1b56fb940b3b.tar.gz |
ENH: generalize rot90 with axes kwarg, move to function_base.py, and add tests
Diffstat (limited to 'numpy/lib/tests/test_twodim_base.py')
-rw-r--r-- | numpy/lib/tests/test_twodim_base.py | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/numpy/lib/tests/test_twodim_base.py b/numpy/lib/tests/test_twodim_base.py index b65a8df97..738a02b37 100644 --- a/numpy/lib/tests/test_twodim_base.py +++ b/numpy/lib/tests/test_twodim_base.py @@ -9,7 +9,7 @@ from numpy.testing import ( ) from numpy import ( - arange, rot90, add, fliplr, flipud, zeros, ones, eye, array, diag, + arange, add, fliplr, flipud, zeros, ones, eye, array, diag, histogram2d, tri, mask_indices, triu_indices, triu_indices_from, tril_indices, tril_indices_from, vander, ) @@ -169,37 +169,6 @@ class TestFlipud(TestCase): assert_equal(flipud(a), b) -class TestRot90(TestCase): - def test_basic(self): - self.assertRaises(ValueError, rot90, ones(4)) - - a = [[0, 1, 2], - [3, 4, 5]] - b1 = [[2, 5], - [1, 4], - [0, 3]] - b2 = [[5, 4, 3], - [2, 1, 0]] - b3 = [[3, 0], - [4, 1], - [5, 2]] - b4 = [[0, 1, 2], - [3, 4, 5]] - - for k in range(-3, 13, 4): - assert_equal(rot90(a, k=k), b1) - for k in range(-2, 13, 4): - assert_equal(rot90(a, k=k), b2) - for k in range(-1, 13, 4): - assert_equal(rot90(a, k=k), b3) - for k in range(0, 13, 4): - assert_equal(rot90(a, k=k), b4) - - def test_axes(self): - a = ones((50, 40, 3)) - assert_equal(rot90(a).shape, (40, 50, 3)) - - class TestHistogram2d(TestCase): def test_simple(self): x = array( |