diff options
author | njsmith <njs@pobox.com> | 2013-10-02 11:11:37 -0700 |
---|---|---|
committer | njsmith <njs@pobox.com> | 2013-10-02 11:11:37 -0700 |
commit | f665c617065ba59b1c517b8dd44080c83dbfd5bd (patch) | |
tree | d0116d3adb263c80d1ccb11282c26dc7f663e87d /numpy/lib/function_base.py | |
parent | d2316262a7837dd68904645453c0eee01427a0fc (diff) | |
parent | e6f0c9023d9a57a83d83684c2f63ad924038be69 (diff) | |
download | numpy-f665c617065ba59b1c517b8dd44080c83dbfd5bd.tar.gz |
Merge pull request #3851 from juliantaylor/median-subclass
BUG: preserve ndarray subclasses in median
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index fe41a996f..4d765bbc1 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2764,7 +2764,7 @@ def median(a, axis=None, out=None, overwrite_input=False): >>> assert not np.all(a==b) """ - a = np.asarray(a) + a = np.asanyarray(a) if axis is not None and axis >= a.ndim: raise IndexError( "axis %d out of bounds (%d)" % (axis, a.ndim)) |