internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: scikit-hep/pyhf

Issue:
docs: Investiage revising author field styling in Zenodo citation
# Description

The current Zendo citation of 

https://github.com/scikit-hep/pyhf/blob/3f0c8fc26d13bf2c7740bd2465bc10bbcd5f7746/src/pyhf/data/citation.bib#L1-L7

quotes the author field which can make some BibTeX style files force it to render in a way that is perhaps not desirable

![current_render](https://user-images.githubusercontent.com/5142394/108158122-e513dc00-70a9-11eb-8ad1-cafacccb19e5.png)

However, if the author field is given to BibTeX with more flexibility (using `and`s and without quotes)

```bibtex
@software{pyhf,
  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark},
  title = "{pyhf: v0.6.0}",
  version = {0.6.0},
  doi = {10.5281/zenodo.1169739},
  url = {https://github.com/scikit-hep/pyhf},
}
```

the render can be improved

![alt_render](https://user-images.githubusercontent.com/5142394/108158152-f230cb00-70a9-11eb-88ee-e120c672063d.png)

Thoughts on style here @lukasheinrich @kratsg?


Discussion:
I like the shorter version better, indeed.

Resolving patch:
diff --git a/src/pyhf/utils.py b/src/pyhf/utils.py
--- a/src/pyhf/utils.py
+++ b/src/pyhf/utils.py
@@ -142,7 +142,7 @@ def citation(oneline=False):
 
         >>> import pyhf
         >>> pyhf.utils.citation(True)
-        '@software{pyhf,  author = "{Heinrich, Lukas and Feickert, Matthew and Stark, Giordon}",  title = "{pyhf: v0.6.0}",  version = {0.6.0},  doi = {10.5281/zenodo.1169739},  url = {https://github.com/scikit-hep/pyhf},}@article{pyhf_joss,  doi = {10.21105/joss.02823},  url = {https://doi.org/10.21105/joss.02823},  year = {2021},  publisher = {The Open Journal},  volume = {6},  number = {58},  pages = {2823},  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark and Kyle Cranmer},  title = {pyhf: pure-Python implementation of HistFactory statistical models},  journal = {Journal of Open Source Software}}'
+        '@software{pyhf,  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark},  title = "{pyhf: v0.6.0}",  version = {0.6.0},  doi = {10.5281/zenodo.1169739},  url = {https://github.com/scikit-hep/pyhf},}@article{pyhf_joss,  doi = {10.21105/joss.02823},  url = {https://doi.org/10.21105/joss.02823},  year = {2021},  publisher = {The Open Journal},  volume = {6},  number = {58},  pages = {2823},  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark and Kyle Cranmer},  title = {pyhf: pure-Python implementation of HistFactory statistical models},  journal = {Journal of Open Source Software}}'
 
     Keyword Args:
         oneline (:obj:`bool`): Whether to provide citation with new lines (default) or as a one-liner.


Test patch:
Repository: scikit-hep/pyhf

Issue:
Use new APIs added in PyTorch v1.8.0
# Description

In PyTorch `v1.8.0` in the [Python API section under "New features"](https://github.com/pytorch/pytorch/releases/tag/v1.8.0) there is the addition of `torch.ravel` (https://github.com/pytorch/pytorch/pull/46098) and `torch.tile` (https://github.com/pytorch/pytorch/pull/47974) to the public API. These should be adopted for the `torch` backend.

Currently we use

https://github.com/scikit-hep/pyhf/blob/2c10be3bb405f157dc0e965fb320f0813a826a28/src/pyhf/tensor/pytorch_backend.py#L194-L212

and

https://github.com/scikit-hep/pyhf/blob/2c10be3bb405f157dc0e965fb320f0813a826a28/src/pyhf/tensor/pytorch_backend.py#L126-L146


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@
         'tensorflow~=2.2.0',  # TensorFlow minor releases are as volatile as major
         'tensorflow-probability~=0.10.0',
     ],
-    'torch': ['torch~=1.2'],
+    'torch': ['torch~=1.8'],
     'jax': ['jax~=0.2.4', 'jaxlib~=0.1.56'],
     'xmlio': [
         'uproot3~=3.14',
diff --git a/src/pyhf/tensor/pytorch_backend.py b/src/pyhf/tensor/pytorch_backend.py
--- a/src/pyhf/tensor/pytorch_backend.py
+++ b/src/pyhf/tensor/pytorch_backend.py
@@ -143,10 +143,31 @@ def tile(self, tensor_in, repeats):
         Returns:
             PyTorch tensor: The tensor with repeated axes
         """
-        return tensor_in.repeat(repeats)
+        return tensor_in.tile(repeats)
 
     def outer(self, tensor_in_1, tensor_in_2):
-        return torch.ger(tensor_in_1, tensor_in_2)
+        """
+        Outer product of the input tensors.
+
+        Example:
+
+            >>> import pyhf
+            >>> pyhf.set_backend("pytorch")
+            >>> a = pyhf.tensorlib.astensor([1.0, 2.0, 3.0])
+            >>> b = pyhf.tensorlib.astensor([1.0, 2.0, 3.0, 4.0])
+            >>> pyhf.tensorlib.outer(a, b)
+            tensor([[ 1.,  2.,  3.,  4.],
+                    [ 2.,  4.,  6.,  8.],
+                    [ 3.,  6.,  9., 12.]])
+
+        Args:
+            tensor_in_1 (:obj:`tensor`): 1-D input tensor.
+            tensor_in_2 (:obj:`tensor`): 1-D input tensor.
+
+        Returns:
+            PyTorch tensor: The outer product.
+        """
+        return torch.outer(tensor_in_1, tensor_in_2)
 
     def astensor(self, tensor_in, dtype='float'):
         """
@@ -209,7 +230,7 @@ def ravel(self, tensor):
         Returns:
             `torch.Tensor`: A flattened array.
         """
-        return tensor.view(-1)
+        return torch.ravel(tensor)
 
     def sum(self, tensor_in, axis=None):
         return (


Test patch:
Repository: scikit-hep/pyhf

Issue:
Validate lower bounds of dependencies in CI
# Description

To ensure that the lower bound of all dependencies are still sufficient for the API used, add a test that installs from a `lower-bound-requirements.txt` that might look something like

```
# core
scipy==1.4.0
click==7.0.0
tqdm==4.56.0
jsonschema==3.2.0
jsonpatch==1.23.0
pyyaml==5.1.0
# xmlio
uproot3==3.14.0
uproot==4.0.0
# minuit
iminuit==2.1.0
# ...
```

and then run the test suite.


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -3,13 +3,13 @@
 extras_require = {
     'shellcomplete': ['click_completion'],
     'tensorflow': [
-        'tensorflow~=2.2.0',  # TensorFlow minor releases are as volatile as major
-        'tensorflow-probability~=0.10.0',
+        'tensorflow~=2.2.1',  # TensorFlow minor releases are as volatile as major
+        'tensorflow-probability~=0.10.1',
     ],
     'torch': ['torch~=1.8'],
-    'jax': ['jax~=0.2.4', 'jaxlib~=0.1.56'],
+    'jax': ['jax~=0.2.8', 'jaxlib~=0.1.58'],
     'xmlio': [
-        'uproot3~=3.14',
+        'uproot3>=3.14.1',
         'uproot~=4.0',
     ],  # uproot3 required until writing to ROOT supported in uproot4
     'minuit': ['iminuit~=2.1,<2.4'],  # iminuit v2.4.0 behavior needs to be understood


Test patch:
Repository: scikit-hep/pyhf

Issue:
Add pyhf.utils.citation to the python API



Discussion:

Resolving patch:
diff --git a/src/pyhf/utils.py b/src/pyhf/utils.py
--- a/src/pyhf/utils.py
+++ b/src/pyhf/utils.py
@@ -141,7 +141,7 @@ def citation(oneline=False):
     Example:
 
         >>> import pyhf
-        >>> pyhf.utils.citation(True)
+        >>> pyhf.utils.citation(oneline=True)
         '@software{pyhf,  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark},  title = "{pyhf: v0.6.1}",  version = {0.6.1},  doi = {10.5281/zenodo.1169739},  url = {https://github.com/scikit-hep/pyhf},}@article{pyhf_joss,  doi = {10.21105/joss.02823},  url = {https://doi.org/10.21105/joss.02823},  year = {2021},  publisher = {The Open Journal},  volume = {6},  number = {58},  pages = {2823},  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark and Kyle Cranmer},  title = {pyhf: pure-Python implementation of HistFactory statistical models},  journal = {Journal of Open Source Software}}'
 
     Keyword Args:


Test patch:
Repository: scikit-hep/pyhf

Issue:
Update requested software citation URL
# Description

It seems that we might want to update the recommended software citation BibTeX entry for the software itself as the Zenodo DOI keeps getting cut off in the actual citations.

**Example:**

With the current entry of

https://github.com/scikit-hep/pyhf/blob/cc38945bb73e379997c06ba30df3ff666d8e81c8/src/pyhf/data/citation.bib#L1-L7

we are seeing a lot of this (c.f. PR #1421)

[![BelleII_cite](https://user-images.githubusercontent.com/5142394/116596816-7b565080-a8ea-11eb-917f-4e7ccb8db73b.png)](https://arxiv.org/abs/2104.12624)

It might be better to get the Zenodo DOI URL in there instead and keep the GitHub URL as a `note` entry:

```bibtex
 @software{pyhf, 
   author = {Lukas Heinrich and Matthew Feickert and Giordon Stark}, 
   title = "{pyhf: v0.6.1}", 
   version = {0.6.1}, 
   doi = {10.5281/zenodo.1169739}, 
   url = {https://doi.org/10.5281/zenodo.1169739},
   note = {https://github.com/scikit-hep/pyhf} 
 } 
```

@kratsg @lukasheinrich thoughts?


Discussion:
Or maybe even

```bibtex
 @software{pyhf, 
   author = {Lukas Heinrich and Matthew Feickert and Giordon Stark}, 
   title = "{pyhf: v0.6.1}", 
   version = {0.6.1}, 
   doi = {10.5281/zenodo.1169739}, 
   url = {https://doi.org/10.5281/zenodo.1169739},
   note = {https://github.com/scikit-hep/pyhf/releases/tag/v0.6.1} 
 } 
```

As the tag number would get picked up by `bump2version`.

Resolving patch:
diff --git a/src/pyhf/utils.py b/src/pyhf/utils.py
--- a/src/pyhf/utils.py
+++ b/src/pyhf/utils.py
@@ -142,7 +142,7 @@ def citation(oneline=False):
 
         >>> import pyhf
         >>> pyhf.utils.citation(oneline=True)
-        '@software{pyhf,  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark},  title = "{pyhf: v0.6.1}",  version = {0.6.1},  doi = {10.5281/zenodo.1169739},  url = {https://github.com/scikit-hep/pyhf},}@article{pyhf_joss,  doi = {10.21105/joss.02823},  url = {https://doi.org/10.21105/joss.02823},  year = {2021},  publisher = {The Open Journal},  volume = {6},  number = {58},  pages = {2823},  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark and Kyle Cranmer},  title = {pyhf: pure-Python implementation of HistFactory statistical models},  journal = {Journal of Open Source Software}}'
+        '@software{pyhf,  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark},  title = "{pyhf: v0.6.1}",  version = {0.6.1},  doi = {10.5281/zenodo.1169739},  url = {https://doi.org/10.5281/zenodo.1169739},  note = {https://github.com/scikit-hep/pyhf/releases/tag/v0.6.1}}@article{pyhf_joss,  doi = {10.21105/joss.02823},  url = {https://doi.org/10.21105/joss.02823},  year = {2021},  publisher = {The Open Journal},  volume = {6},  number = {58},  pages = {2823},  author = {Lukas Heinrich and Matthew Feickert and Giordon Stark and Kyle Cranmer},  title = {pyhf: pure-Python implementation of HistFactory statistical models},  journal = {Journal of Open Source Software}}'
 
     Keyword Args:
         oneline (:obj:`bool`): Whether to provide citation with new lines (default) or as a one-liner.


Test patch:
Repository: scikit-hep/pyhf

Issue:
Split "Use in Publications" into use cases and general citations
> Technically speaking we don't actually use `pyhf` to obtain the results of our paper,

Yeah, as you correctly point out we just have the "list of citations and use cases of `pyhf`" under "[Use in Publications](https://scikit-hep.org/pyhf/citations.html#use-in-publications)" and we should probably split that out into actual use cases vs. just citations like this one.

_Originally posted by @matthewfeickert in https://github.com/scikit-hep/pyhf/issues/1537#issuecomment-890282084_


Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -63,6 +63,7 @@ def setup(app):
     "bib/talks.bib",
     "bib/tutorials.bib",
     "bib/use_citations.bib",
+    "bib/general_citations.bib",
 ]
 
 # external links


Test patch:
Repository: scikit-hep/pyhf

Issue:
Auxdata kwarg harmonization in expected / observed data
# Description

The API for expected and observed data (from model / workspace) uses two different names for the kwarg to steer whether auxdata should be included in the return value:

```python
import pyhf

model = pyhf.simplemodels.uncorrelated_background(
    signal=[12.0, 11.0], bkg=[50.0, 52.0], bkg_uncertainty=[3.0, 7.0]
)
print(model.expected_data([0.0, 1.0, 1.0], include_auxdata=False))

ws = pyhf.Workspace.build(model, [52.0, 53.0])
print(ws.data(model, with_aux=False))
```

`expected_data` uses `include_auxdata`, while `data` uses `with_aux`. I am opening this issue to suggest harmonizing the naming.

## Is your feature request related to a problem? Please describe.
I occasionally confuse the kwarg names, of course a very minor problem.

### Describe the solution you'd like
Harmonization of the kwargs.

### Describe alternatives you've considered
Sticking with current state, and/or using higher-level interfaces (`cabinetry.model_utils`) to avoid having to remember the name.

# Relevant Issues and Pull Requests
none

# Additional context
none


Discussion:

Resolving patch:
diff --git a/src/pyhf/workspace.py b/src/pyhf/workspace.py
--- a/src/pyhf/workspace.py
+++ b/src/pyhf/workspace.py
@@ -417,7 +417,7 @@ def model(self, **config_kwargs):
 
         return Model(modelspec, poi_name=measurement['config']['poi'], **config_kwargs)
 
-    def data(self, model, with_aux=True):
+    def data(self, model, include_auxdata=True):
         """
         Return the data for the supplied model with or without auxiliary data from the model.
 
@@ -428,7 +428,7 @@ def data(self, model, with_aux=True):
 
         Args:
             model (~pyhf.pdf.Model): A model object adhering to the schema model.json
-            with_aux (:obj:`bool`): Whether to include auxiliary data from the model or not
+            include_auxdata (:obj:`bool`): Whether to include auxiliary data from the model or not
 
         Returns:
             :obj:`list`: data
@@ -444,7 +444,7 @@ def data(self, model, with_aux=True):
                 exc_info=True,
             )
             raise
-        if with_aux:
+        if include_auxdata:
             observed_data += model.config.auxdata
         return observed_data
 


Test patch:
diff --git a/tests/test_workspace.py b/tests/test_workspace.py
--- a/tests/test_workspace.py
+++ b/tests/test_workspace.py
@@ -142,13 +142,13 @@ def test_workspace_observations(workspace_factory):
 
 
 @pytest.mark.parametrize(
-    "with_aux",
+    "include_auxdata",
     [True, False],
 )
-def test_get_workspace_data(workspace_factory, with_aux):
+def test_get_workspace_data(workspace_factory, include_auxdata):
     w = workspace_factory()
     m = w.model()
-    assert w.data(m, with_aux=with_aux)
+    assert w.data(m, include_auxdata=include_auxdata)
 
 
 def test_get_workspace_data_bad_model(workspace_factory, caplog):
Repository: scikit-hep/pyhf

Issue:
pass calculator options through `pyhf.infer.upperlimit` (toys)
# Description

Currently there's no easy way to pass custom options to upperlimit so it'll always acll asymptotics


Discussion:
@lukasheinrich I think this is a duplicate of Issue #1326, so I'm going to close in favor of that Issue. If you meant something more general feel free to reopen.
This actually hits on toys vs. asymptotics, which is slightly different. A PR could hit both this and Issue #1326.

Resolving patch:
diff --git a/src/pyhf/infer/intervals.py b/src/pyhf/infer/intervals.py
--- a/src/pyhf/infer/intervals.py
+++ b/src/pyhf/infer/intervals.py
@@ -15,7 +15,7 @@ def _interp(x, xp, fp):
     return tb.astensor(np.interp(x, xp.tolist(), fp.tolist()))
 
 
-def upperlimit(data, model, scan, level=0.05, return_results=False):
+def upperlimit(data, model, scan, level=0.05, return_results=False, **hypotest_kwargs):
     """
     Calculate an upper limit interval ``(0, poi_up)`` for a single
     Parameter of Interest (POI) using a fixed scan through POI-space.
@@ -44,6 +44,8 @@ def upperlimit(data, model, scan, level=0.05, return_results=False):
         scan (:obj:`iterable`): Iterable of POI values.
         level (:obj:`float`): The threshold value to evaluate the interpolated results at.
         return_results (:obj:`bool`): Whether to return the per-point results.
+        hypotest_kwargs (:obj:`string`): Kwargs for the calls to
+         :class:`~pyhf.infer.hypotest` to configure the fits.
 
     Returns:
         Tuple of Tensors:
@@ -56,7 +58,7 @@ def upperlimit(data, model, scan, level=0.05, return_results=False):
     """
     tb, _ = get_backend()
     results = [
-        hypotest(mu, data, model, test_stat="qtilde", return_expected_set=True)
+        hypotest(mu, data, model, return_expected_set=True, **hypotest_kwargs)
         for mu in scan
     ]
     obs = tb.astensor([[r[0]] for r in results])


Test patch:
diff --git a/tests/test_infer.py b/tests/test_infer.py
--- a/tests/test_infer.py
+++ b/tests/test_infer.py
@@ -34,6 +34,22 @@ def test_upperlimit(tmpdir, hypotest_args):
     )
 
 
+def test_upperlimit_with_kwargs(tmpdir, hypotest_args):
+    """
+    Check that the default return structure of pyhf.infer.hypotest is as expected
+    """
+    _, data, model = hypotest_args
+    results = pyhf.infer.intervals.upperlimit(
+        data, model, scan=np.linspace(0, 5, 11), test_stat="qtilde"
+    )
+    assert len(results) == 2
+    observed_limit, expected_limits = results
+    assert observed_limit == pytest.approx(1.0262704738584554)
+    assert expected_limits == pytest.approx(
+        [0.65765653, 0.87999725, 1.12453992, 1.50243428, 2.09232927]
+    )
+
+
 def test_mle_fit_default(tmpdir, hypotest_args):
     """
     Check that the default return structure of pyhf.infer.mle.fit is as expected
Repository: scikit-hep/pyhf

Issue:
docs: Enable chronological ordering of talks and tutorials on website
# Description

At the moment, the [docs webpage](https://scikit-hep.org/pyhf/outreach.html) does not order the talks and tutorials given in reverse chronological order. This makes it hard for someone new to find the most recent and relevant information on the page. If the page can be rendered in reverse chronological order that would be very useful.


Discussion:
Surprisingly non-trivial: https://sphinxcontrib-bibtex.readthedocs.io/en/latest/usage.html#custom-formatting-sorting-and-labelling

Not enough documentation so one has to dig through source code or just trial-and-error.

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -65,6 +65,7 @@ def setup(app):
     "bib/use_citations.bib",
     "bib/general_citations.bib",
 ]
+bibtex_default_style = "unsrt"
 
 # external links
 xref_links = {"arXiv:1007.1727": ("[1007.1727]", "https://arxiv.org/abs/1007.1727")}


Test patch:
Repository: scikit-hep/pyhf

Issue:
Remove `pyhf.simplemodels.hepdata_like` from public API for v0.7.0
### Summary

[`pyhf.simplemodels.hepdata_like`](https://pyhf.readthedocs.io/en/v0.6.3/_generated/pyhf.simplemodels.hepdata_like.html#pyhf.simplemodels.hepdata_like) has been scheduled for removal from the public API in release `v0.7.0`. As `v0.7.0` will be the next release (and hopefully soon) this should get removed now.

### Additional Information

`pyhf.simplemodels.hepdata_like` has been deprecated since `v0.6.2`.

### Code of Conduct

- [X] I agree to follow the Code of Conduct


Discussion:
@matthewfeickert , can I take this one?
> can I take this one?

Go for it. :+1: 

Resolving patch:
diff --git a/src/pyhf/simplemodels.py b/src/pyhf/simplemodels.py
--- a/src/pyhf/simplemodels.py
+++ b/src/pyhf/simplemodels.py
@@ -151,20 +151,3 @@ def _deprecated_api_warning(
         DeprecationWarning,
         stacklevel=3,  # Raise to user level
     )
-
-
-def hepdata_like(signal_data, bkg_data, bkg_uncerts, batch_size=None):
-    """
-    .. note:: Deprecated API: Use :func:`~pyhf.simplemodels.uncorrelated_background`
-     instead.
-
-    .. warning:: :func:`~pyhf.simplemodels.hepdata_like` will be removed in
-     ``pyhf`` ``v0.7.0``.
-    """
-    _deprecated_api_warning(
-        "pyhf.simplemodels.hepdata_like",
-        "pyhf.simplemodels.uncorrelated_background",
-        "0.6.2",
-        "0.7.0",
-    )
-    return uncorrelated_background(signal_data, bkg_data, bkg_uncerts, batch_size)


Test patch:
diff --git a/tests/test_simplemodels.py b/tests/test_simplemodels.py
--- a/tests/test_simplemodels.py
+++ b/tests/test_simplemodels.py
@@ -1,5 +1,3 @@
-import warnings
-
 import pytest
 import pyhf
 
@@ -76,17 +74,3 @@ def test_uncorrelated_background_default_backend(default_backend):
         'uncorr_bkguncrt[1]',
     ]
     assert model.config.suggested_init() == [1.0, 1.0, 1.0]
-
-
-# TODO: Remove when pyhf.simplemodels.hepdata_like is removed in pyhf v0.7.0
-def test_deprecated_apis():
-    with warnings.catch_warnings(record=True) as _warning:
-        # Cause all warnings to always be triggered
-        warnings.simplefilter("always")
-        pyhf.simplemodels.hepdata_like([12.0, 11.0], [50.0, 52.0], [3.0, 7.0])
-        assert len(_warning) == 1
-        assert issubclass(_warning[-1].category, DeprecationWarning)
-        assert (
-            "pyhf.simplemodels.hepdata_like is deprecated in favor of pyhf.simplemodels.uncorrelated_background"
-            in str(_warning[-1].message)
-        )
Repository: scikit-hep/pyhf

Issue:
scipy reference objects can't be found for docs
### Summary

The docs are failing to build as we're hitting the warning

```pytb
WARNING: failed to reach any of the inventories with the following issues:
intersphinx inventory 'https://docs.scipy.org/doc/scipy/reference/objects.inv' not readable due to ValueError: unknown or unsupported inventory version: ValueError('invalid inventory header: ')
```

It is unclear if these just got moved when [`scipy` `v1.8.0`](https://pypi.org/project/scipy/1.8.0/#history) got released or if there is some outage.

### OS / Environment

All


### Steps to Reproduce

Build the docs in CI

### File Upload (optional)

_No response_

### Expected Results

Docs build without warnings or errors

### Actual Results

```pytb
WARNING: failed to reach any of the inventories with the following issues:
intersphinx inventory 'https://docs.scipy.org/doc/scipy/reference/objects.inv' not readable due to ValueError: unknown or unsupported inventory version: ValueError('invalid inventory header: ')
```


### pyhf Version

`HEAD` is at e3d879f3e4982ac629bec7bf92d78b00025e52dc


### Code of Conduct

- [X] I agree to follow the Code of Conduct


Discussion:
This is covered in https://github.com/scipy/scipy/issues/15545.

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -73,7 +73,7 @@ def setup(app):
 intersphinx_mapping = {
     'python': ('https://docs.python.org/3', None),
     'numpy': ('https://numpy.org/doc/stable/', None),
-    'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
+    'scipy': ('https://docs.scipy.org/doc/scipy/', None),
     'matplotlib': ('https://matplotlib.org/stable/', None),
     'iminuit': ('https://iminuit.readthedocs.io/en/stable/', None),
     'uproot': ('https://uproot.readthedocs.io/en/latest/', None),


Test patch:
diff --git a/tests/test_optim.py b/tests/test_optim.py
--- a/tests/test_optim.py
+++ b/tests/test_optim.py
@@ -9,7 +9,7 @@
 import numpy as np
 
 
-# from https://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html#nelder-mead-simplex-algorithm-method-nelder-mead
+# from https://docs.scipy.org/doc/scipy/tutorial/optimize.html#nelder-mead-simplex-algorithm-method-nelder-mead
 @pytest.mark.skip_pytorch
 @pytest.mark.skip_pytorch64
 @pytest.mark.skip_tensorflow