diff options
author | Nico Schlömer <nico.schloemer@gmail.com> | 2017-08-11 03:01:06 +0200 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-08-10 20:01:06 -0500 |
commit | 029863eae86b9df2de4b9a9843ca8f88c99130df (patch) | |
tree | ced3f88544979e2dc6f7eb327963c5d2688374ef /numpy/lib/tests/test_function_base.py | |
parent | 4c18530b1e3e428a3755c6847f70322ec12bdbc2 (diff) | |
download | numpy-029863eae86b9df2de4b9a9843ca8f88c99130df.tar.gz |
MAINT: Use moveaxis instead of rollaxis internally (#9475)
Also add a hint to the documentation advising the use of moveaxis over rollaxis.
Tests for rollaxis are left alone.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 151c20a4b..4c90abbf6 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -3011,7 +3011,7 @@ class TestPercentile(object): o = np.random.normal(size=(71, 23)) x = np.dstack([o] * 10) assert_equal(np.percentile(x, 30, axis=(0, 1)), np.percentile(o, 30)) - x = np.rollaxis(x, -1, 0) + x = np.moveaxis(x, -1, 0) assert_equal(np.percentile(x, 30, axis=(-2, -1)), np.percentile(o, 30)) x = x.swapaxes(0, 1).copy() assert_equal(np.percentile(x, 30, axis=(0, -1)), np.percentile(o, 30)) @@ -3392,7 +3392,7 @@ class TestMedian(object): o = np.random.normal(size=(71, 23)) x = np.dstack([o] * 10) assert_equal(np.median(x, axis=(0, 1)), np.median(o)) - x = np.rollaxis(x, -1, 0) + x = np.moveaxis(x, -1, 0) assert_equal(np.median(x, axis=(-2, -1)), np.median(o)) x = x.swapaxes(0, 1).copy() assert_equal(np.median(x, axis=(0, -1)), np.median(o)) |