summaryrefslogtreecommitdiff
path: root/numpy/ma/tests/test_extras.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2017-02-27 14:10:13 +0100
committerJulian Taylor <jtaylor.debian@googlemail.com>2017-02-27 16:43:42 +0100
commit05aa44d53f4f9528847a0c014fe4bda5caa5fd3d (patch)
tree441b603859c485f386ee9b9adb9042b947e6ca54 /numpy/ma/tests/test_extras.py
parentad8afe82e7b7643607a348c0e02b45c9131c6a06 (diff)
downloadnumpy-05aa44d53f4f9528847a0c014fe4bda5caa5fd3d.tar.gz
BUG: fix ma.median for empty ndarrays
return nan as it did in 1.11 and same as normal median. closes gh-8703
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r--numpy/ma/tests/test_extras.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py
index fb68bd261..547a3fb81 100644
--- a/numpy/ma/tests/test_extras.py
+++ b/numpy/ma/tests/test_extras.py
@@ -1039,14 +1039,14 @@ class TestMedian(TestCase):
# axis 0 and 1
b = np.ma.masked_array(np.array([], dtype=float, ndmin=2))
- assert_equal(np.median(a, axis=0), b)
- assert_equal(np.median(a, axis=1), b)
+ assert_equal(np.ma.median(a, axis=0), b)
+ assert_equal(np.ma.median(a, axis=1), b)
# axis 2
b = np.ma.masked_array(np.array(np.nan, dtype=float, ndmin=2))
with warnings.catch_warnings(record=True) as w:
warnings.filterwarnings('always', '', RuntimeWarning)
- assert_equal(np.median(a, axis=2), b)
+ assert_equal(np.ma.median(a, axis=2), b)
assert_(w[0].category is RuntimeWarning)
def test_object(self):