diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-10-01 20:02:03 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-10-02 18:46:52 +0200 |
commit | e6f0c9023d9a57a83d83684c2f63ad924038be69 (patch) | |
tree | da0c7d09edf1d9f2a3bb10ac317fbb2e44c7ee15 /numpy/lib/function_base.py | |
parent | 74abfa27763f76cbce0ec1a1763f0687e5d8a4c0 (diff) | |
download | numpy-e6f0c9023d9a57a83d83684c2f63ad924038be69.tar.gz |
BUG: preserve ndarray subclasses in median
closes gh-3846
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)) |