Repository: scipy/scipy

Issue:
DOC: API reference doesn't point users to replacement for interp1d
### Issue with current documentation:

Looking at the [documentation for interp1d](https://docs.scipy.org/doc/scipy-1.11.1/reference/generated/scipy.interpolate.interp1d.html), I see it's legacy, but it wasn't clear what to replace it with. It took some searching before finding the explanation [in the user guide](https://docs.scipy.org/doc/scipy-1.11.1/tutorial/interpolate/1D.html#legacy-interface-for-1-d-interpolation-interp1d).

### Idea or request for content:

Give some explanation or point to the user guide from the reference page.

### Additional context (e.g. screenshots, GIFs)

_No response_


Discussion:
Thanks for pointing that out @kjohnsen, would you be interested in submitting a pr adding a link to the user guide?
Is the scope of this issue just to add a reference to the new way to do it? It looks like the preferred methods do not do everything that interp1d does; the main thing is "nearest" interpolation.
Yes I think adding a link in the legacy directive to that section of the user guide could close this issue
I could do a PR sometime in the next couple days, though someone with the dev environment already set up might be able to do it faster
I'm new to contributing. I think I have the changes right but want to run sphinx to confirm that they're all correct. When I do,
`sphinx-build -b html scipy/doc/source/ scipy/doc/build/html`
I see,
```
Running Sphinx v7.0.1

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/Users/alexszatmary/Dropbox/code/scipy/scipy/__init__.py", line 111, in
 <module>
    from scipy.__config__ import show as show_config
ModuleNotFoundError: No module named 'scipy.__config__'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-
packages/sphinx/config.py", line 354, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alexszatmary/Dropbox/code/scipy/doc/source/conf.py", line 18, in
 <module>
    import scipy
  File "/Users/alexszatmary/Dropbox/code/scipy/scipy/__init__.py", line 116, in
 <module>
    raise ImportError(msg) from e
ImportError: Error importing SciPy: you cannot import SciPy while
        being in scipy source directory; please exit the SciPy source
        tree first and relaunch your Python interpreter.
```
I think the fix is probably obvious, something like tweaking the PYTHONPATH or conf.py.
`$ python dev.py doc`
Let me try working on this :) part of the SciPy sprint at SciPy Conference '23

Resolving patch:
diff --git a/scipy/interpolate/_interpolate.py b/scipy/interpolate/_interpolate.py
--- a/scipy/interpolate/_interpolate.py
+++ b/scipy/interpolate/_interpolate.py
@@ -389,6 +389,9 @@ class interp1d(_Interpolator1D):
 
     .. legacy:: class
 
+        For a guide to the intended replacements for `interp1d` see
+        :ref:`tutorial-interpolate_1Dsection`.
+
     `x` and `y` are arrays of values used to approximate some function f:
     ``y = f(x)``. This class returns a function whose call method uses
     interpolation to find the value of new points.


Test patch: