From 8478ba7e9d12272e70931878c83127cb7290d9c6 Mon Sep 17 00:00:00 2001 From: Stuart Archibald Date: Fri, 23 Sep 2016 11:46:23 +0100 Subject: [PATCH] DOC: Fix erroneous return type description for np.roots. np.roots() does not always return complex roots, the roots of a polynomial depend its coefficients and therefore may be in the real or complex domain. e.g. ``` >>> (np.roots([1,2,3])).dtype dtype('complex128') >>> (np.roots([1,2,])).dtype dtype('float64') ``` --- numpy/lib/polynomial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py index 81c72749a6a9..281d79ec54eb 100644 --- a/numpy/lib/polynomial.py +++ b/numpy/lib/polynomial.py @@ -167,7 +167,7 @@ def roots(p): Returns ------- out : ndarray - An array containing the complex roots of the polynomial. + An array containing the roots of the polynomial. Raises ------