diff options
author | skwbc <shota.kawabuchi+GitHub@gmail.com> | 2016-08-07 06:54:33 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-07 06:54:33 +0900 |
commit | ee42d25974471f5873ff05ad13519405a5a5b49d (patch) | |
tree | f168675afcdeebfb8d456172be945a17d807167d /numpy/ma/extras.py | |
parent | af671c4aada0888e9e38ce0836ed119686e8c5ee (diff) | |
download | numpy-ee42d25974471f5873ff05ad13519405a5a5b49d.tar.gz |
BUG: modified ndim condition to use masked_array
Diffstat (limited to 'numpy/ma/extras.py')
-rw-r--r-- | numpy/ma/extras.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py index c5c33a2ad..cbf7b6cdb 100644 --- a/numpy/ma/extras.py +++ b/numpy/ma/extras.py @@ -630,7 +630,7 @@ def median(a, axis=None, out=None, overwrite_input=False, keepdims=False): m = np.median(getdata(a, subok=True), axis=axis, out=out, overwrite_input=overwrite_input, keepdims=keepdims) - if isinstance(m, np.ndarray) and 2 <= m.ndim: + if isinstance(m, np.ndarray) and 1 <= m.ndim: return masked_array(m, copy=False) else: return m |