summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-12-28 07:40:57 +0000
committerEric Wieser <wieser.eric@gmail.com>2017-12-28 07:57:21 +0000
commite772a1a9bb9626490316e6c9ae8d57cd25cff33c (patch)
tree4d91ea15b1cf54602887547bd0b82da188b34ed7 /numpy/lib/tests/test_function_base.py
parent7bb2d5a8f0219aa5acb5fda05929f1a0745a1883 (diff)
downloadnumpy-e772a1a9bb9626490316e6c9ae8d57cd25cff33c.tar.gz
ENH: Allow ptp to take an axis tuple and keepdims
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index dbab69436..dc5fe3397 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -556,6 +556,9 @@ class TestPtp(object):
assert_equal(b.ptp(axis=0), [5.0, 7.0, 7.0])
assert_equal(b.ptp(axis=-1), [6.0, 6.0, 6.0])
+ assert_equal(b.ptp(axis=0, keepdims=True), [[5.0, 7.0, 7.0]])
+ assert_equal(b.ptp(axis=(0,1), keepdims=True), [[8.0]])
+
class TestCumsum(object):