diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2013-08-17 16:17:39 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2013-08-17 16:17:39 +0200 |
commit | 759a4f9ede6647991f1e347c9b3a04417c2d2f05 (patch) | |
tree | 7aa3c69462744891f537a26c15d2df899919f846 /numpy/lib/function_base.py | |
parent | cdbdaf182334b7b69ffdd39d711c694173ee2e2c (diff) | |
download | numpy-759a4f9ede6647991f1e347c9b3a04417c2d2f05.tar.gz |
BUG: fix np.median so it accepts array_like input. Clean up median tests.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 9336579af..4285bf793 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2670,6 +2670,7 @@ def median(a, axis=None, out=None, overwrite_input=False): >>> assert not np.all(a==b) """ + a = np.asarray(a) if axis is not None and axis >= a.ndim: raise IndexError("axis %d out of bounds (%d)" % (axis, a.ndim)) |