From 5089f5d7714fc8cebaaaf302f4c78cdba739e032 Mon Sep 17 00:00:00 2001 From: Matthew Brett Date: Sun, 24 Feb 2008 18:01:43 +0000 Subject: Return to condition where overwrite_output for median raises error for non-ndarray input --- numpy/lib/function_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/lib/function_base.py') diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index ca45f46f8..ebf0bea5f 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1226,7 +1226,8 @@ def median(a, axis=0, out=None, overwrite_input=False): median. This will save memory when you do not need to preserve the contents of the input array. Treat the input as undefined, but it will probably be fully or partially sorted. Default is - False + False. Note that, if overwrite_input is true, and the input + is not already an ndarray, an error will be raised. Returns ------- @@ -1275,7 +1276,6 @@ def median(a, axis=0, out=None, overwrite_input=False): 3.5 >>> assert not np.all(a==b) """ - a = asanyarray(a) if overwrite_input: if axis is None: sorted = a.ravel() -- cgit v1.2.1