diff options
author | Julian Taylor <juliantaylor108@gmail.com> | 2014-06-08 16:29:06 +0200 |
---|---|---|
committer | Julian Taylor <juliantaylor108@gmail.com> | 2014-06-08 16:29:06 +0200 |
commit | 10098daf387b9468a0aee19c3eb3e0cdd21f874c (patch) | |
tree | 48a425fa7eb4fcfb41f1884bf20f29cc50014317 /numpy/ma/tests/test_extras.py | |
parent | c346477b89a7ce559a9cf40551d9725be5c96f09 (diff) | |
parent | 7f8aae032a218ed609e23068d5aec128b0d6fe8e (diff) | |
download | python-numpy-10098daf387b9468a0aee19c3eb3e0cdd21f874c.tar.gz python-numpy-10098daf387b9468a0aee19c3eb3e0cdd21f874c.tar.bz2 python-numpy-10098daf387b9468a0aee19c3eb3e0cdd21f874c.zip |
Merge pull request #4454 from jurnix/namedargs
ENH: apply_along_axis accepts named arguments
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r-- | numpy/ma/tests/test_extras.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py index 95f935c8b..6ce1dc346 100644 --- a/numpy/ma/tests/test_extras.py +++ b/numpy/ma/tests/test_extras.py @@ -479,6 +479,16 @@ class TestApplyAlongAxis(TestCase): xa = apply_along_axis(myfunc, 2, a) assert_equal(xa, [[1, 4], [7, 10]]) + # Tests kwargs functions + def test_3d_kwargs(self): + a = arange(12).reshape(2, 2, 3) + + def myfunc(b, offset=0): + return b[1+offset] + + xa = apply_along_axis(myfunc, 2, a, offset=1) + assert_equal(xa, [[2, 5], [8, 11]]) + class TestApplyOverAxes(TestCase): # Tests apply_over_axes |