summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorMatthew Brett <matthew.brett@gmail.com>2008-02-24 18:01:43 +0000
committerMatthew Brett <matthew.brett@gmail.com>2008-02-24 18:01:43 +0000
commit5089f5d7714fc8cebaaaf302f4c78cdba739e032 (patch)
treeaf25fb02887476d074c16062980e3d22f3b0bb69 /numpy
parent0abaf57d5c305044148d7688ce248ad050963a7f (diff)
downloadnumpy-5089f5d7714fc8cebaaaf302f4c78cdba739e032.tar.gz
Return to condition where overwrite_output for median raises error for non-ndarray input
Diffstat (limited to 'numpy')
-rw-r--r--numpy/lib/function_base.py4
1 files changed, 2 insertions, 2 deletions
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()