From 9555d91ebfed2f886c932953bba6ae207dc69eae Mon Sep 17 00:00:00 2001 From: Matthew Brett Date: Tue, 19 Feb 2008 23:49:50 +0000 Subject: cumprod docstring, median input array coercion --- numpy/lib/function_base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'numpy/lib/function_base.py') diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index beb3a995c..a0837d16b 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1208,6 +1208,8 @@ def median(a, axis=0, out=None, overwrite_input=False): Parameters ---------- + a : array-like + Input array or object that can be converted to an array axis : {int, None}, optional Axis along which the medians are computed. The default is to compute the median along the first dimension. axis=None @@ -1234,7 +1236,7 @@ def median(a, axis=0, out=None, overwrite_input=False): Return datatype is float64 for ints and floats smaller than float64, or the input datatype otherwise. - SeeAlso + See Also ------- mean @@ -1273,6 +1275,7 @@ 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