Repository: scipy/scipy

Issue:
Lagrange polynomials and numpy Polynomials
<!-- 
Thank you for taking the time to file a bug report. 
Please fill in the fields below, deleting the sections that 
don't apply to your issue. You can view the final output
by clicking the preview button above.
Note: This is a comment, and won't appear in the output.
-->

My issue is about the documentation of lagrange interpolation here: https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.lagrange.html
lagrange returns a numpy.poly1d  that contains "The polynomial’s coefficients, in decreasing powers"

Then, the documentation shows to pass this result to numpy Polynomials. But this class accepts as parameters "Polynomial coefficients in order of increasing degree"
https://numpy.org/doc/stable/reference/generated/numpy.polynomial.polynomial.Polynomial.html

Does it seem like a conceptual error?
Coefficients are the same, but the order is reversed so when you want to interpolate things do not work well

#### Reproducing code example:
```
from numpy.polynomial.polynomial import Polynomial
from scipy.interpolate import lagrange
x = np.array([0, 1, 2])
y = x**3
poly = lagrange(x, y)

poly1d([ 3., -2.,  0.]) #3x^2 -2x

Polynomial(poly).coef
array([ 3., -2.,  0.]) #-2x +3
```



#### Scipy/Numpy/Python version information:

```
import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
1.7.0 1.20.3 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)
```


Discussion:
Yup, it needs to be `Polynomial(poly.coef[::-1])`, cf "Transition guide" at https://numpy.org/doc/stable/reference/routines.polynomials.html (I'd expect Polynomial constructor to recognize its argument to be a poly1d instance, but apparently it does not, probably for good reasons.)

Want to send a quick PR with a fix @Jebby993 ?
Bonus point can be an example with a plot of `Polynomial(poly.coef[::-1])(x)` vs `3*x**2 - 2*x` 
Thank you @ev-br ,I could try (I'm quite new here on github). 
However, I think it would be better to skip the use of Polynomial that could be misleading and exploit numpy.poly1d attributes that are sufficient to show the polynomial coefficient, evaluate the polynomial and eventually compute the roots, without the need to import and use the Polynomial class.
poly1d is considered legacy and its use in new code is discouraged. This function predates numpy Polynomial, so we cannot just change its return type. All in all, best is to show the recommended usage --- which this example tried to do :-). 
@ev-br can we mark these kind of things to deprecate them slowly?
Problem is, I don't see a clean transition path. Do you? 

Just changing the return type is bad; doc notes do not change that; deprecating the whole function  and inventing a new one with a different return type feels like an overkill. So my gut feeling is just keep the status quo and improve the documentation for users to show best practices. 

Resolving patch:
diff --git a/scipy/interpolate/interpolate.py b/scipy/interpolate/interpolate.py
--- a/scipy/interpolate/interpolate.py
+++ b/scipy/interpolate/interpolate.py
@@ -64,8 +64,17 @@ def lagrange(x, w):
         \end{aligned}
 
     >>> from numpy.polynomial.polynomial import Polynomial
-    >>> Polynomial(poly).coef
-    array([ 3., -2.,  0.])
+    >>> Polynomial(poly.coef[::-1]).coef
+    array([ 0., -2.,  3.])
+
+    >>> import matplotlib.pyplot as plt
+    >>> x_new = np.arange(0, 2.1, 0.1)
+    >>> plt.scatter(x, y, label='data')
+    >>> plt.plot(x_new, Polynomial(poly.coef[::-1])(x_new), label='Polynomial')
+    >>> plt.plot(x_new, 3*x_new**2 - 2*x_new + 0*x_new,
+    ...          label=r"$3 x^2 - 2 x$", linestyle='-.')
+    >>> plt.legend()
+    >>> plt.show()
 
     """
 


Test patch: