From e6f0c9023d9a57a83d83684c2f63ad924038be69 Mon Sep 17 00:00:00 2001 From: Julian Taylor Date: Tue, 1 Oct 2013 20:02:03 +0200 Subject: BUG: preserve ndarray subclasses in median closes gh-3846 --- numpy/lib/function_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/function_base.py') 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)) -- cgit v1.2.1