From 9316110a42c370616cbb80ae3e1769534d04de10 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Mon, 16 Sep 2013 10:44:26 -0600 Subject: TST: note on overwrite_input parameter in percentile * added note that `overwrite_input` has not effect when `a` is not an array in the percentile function. * added unit test to verify that no error is raised when `a` is not an array and `overwrite_input` is True. --- numpy/lib/function_base.py | 5 +++-- 1 file changed, 3 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 9475c2edf..472d7eecc 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2803,8 +2803,9 @@ def percentile(a, q, interpolation='linear', axis=None, out=None, the contents of the input array. In this case you should not make any assumptions about the content of the passed in array `a` after this function completes -- treat it as undefined. Default is False. - Note that, if `overwrite_input` is True and the input is not - already an array, an error will be raised. + Note that, if the `a` input is not already an array this parameter + will have no effect, `a` will be converted to an array internally + regardless of the value of this parameter. Returns ------- -- cgit v1.2.1