Repository: scipy/scipy

Issue:
DOC: err on example for `scipy.signal.upfirdn`
### Describe your issue.

Hi, I just find an issue that the function doesn't perform as the example shown in the official document page, and I posted question in stack overflow for asking the viewers for double checking.

The link shown in below:
https://stackoverflow.com/questions/72780380/scipy-signal-upfirdn-function-wrong-official-document-instruction-example

BTW there is no document clarifying the function change

### Reproducing Code Example

```python
Input:sccipy.signal.upfirdn([1], [1, 2, 3], 3) will generate

Output: array([ 1., 0., 0., 2., 0., 0., 3.]) instead of

Expected Output:array([ 1., 0., 0., 2., 0., 0., 3., 0., 0.]), and the size is 7 insetad of 9
```


### Error message

```shell
There is no error or warning message, but the size difference will report the error when executing code later.
```


### SciPy/NumPy/Python version information

scipy version >= 1.5.0 python version 3.7.4 numpy version 1.20


Discussion:
Hi @wei2222, thank you for reporting. Indeed the doc is different, which is strange since we have doctests. But that's another story.

Would you like to make a PR to fix it?
Hey! can you assign me this issue?
Hi @shrooot, we don't assign issues. And we would consider your PR only if @wei2222 does not express any interest in making a PR. We don't want people to compete on PR/issues as there is plenty of work to do considering all programming levels.
okay sure, I'll have a look later 👍🏻 
In which file I can find ```sccipy.signal.upfirdn```?
@tupui Sure, I would like to make the PR. 
> In which file I can find `sccipy.signal.upfirdn`?

I believe the file is named /scipy/signal/_upfirdn.py
Yes it is. You will see locally when you will build the documentation. (Use our CLI, `dev.py`
@tupui Do I have the right to create a new branch and push it?
> @tupui Do I have the right to create a new branch and push it?

You need to create a new branch on your own fork. Please have a look at our contributing documentation. https://scipy.github.io/devdocs/dev/contributor/development_workflow.html

Resolving patch:
diff --git a/scipy/signal/_upfirdn.py b/scipy/signal/_upfirdn.py
--- a/scipy/signal/_upfirdn.py
+++ b/scipy/signal/_upfirdn.py
@@ -169,15 +169,15 @@ def upfirdn(h, x, up=1, down=1, axis=-1, mode='constant', cval=0):
     >>> upfirdn([1, 1, 1], [1, 1, 1])   # FIR filter
     array([ 1.,  2.,  3.,  2.,  1.])
     >>> upfirdn([1], [1, 2, 3], 3)  # upsampling with zeros insertion
-    array([ 1.,  0.,  0.,  2.,  0.,  0.,  3.,  0.,  0.])
+    array([ 1.,  0.,  0.,  2.,  0.,  0.,  3.])
     >>> upfirdn([1, 1, 1], [1, 2, 3], 3)  # upsampling with sample-and-hold
     array([ 1.,  1.,  1.,  2.,  2.,  2.,  3.,  3.,  3.])
     >>> upfirdn([.5, 1, .5], [1, 1, 1], 2)  # linear interpolation
-    array([ 0.5,  1. ,  1. ,  1. ,  1. ,  1. ,  0.5,  0. ])
+    array([ 0.5,  1. ,  1. ,  1. ,  1. ,  1. ,  0.5])
     >>> upfirdn([1], np.arange(10), 1, 3)  # decimation by 3
     array([ 0.,  3.,  6.,  9.])
     >>> upfirdn([.5, 1, .5], np.arange(10), 2, 3)  # linear interp, rate 2/3
-    array([ 0. ,  1. ,  2.5,  4. ,  5.5,  7. ,  8.5,  0. ])
+    array([ 0. ,  1. ,  2.5,  4. ,  5.5,  7. ,  8.5])
 
     Apply a single filter to multiple signals:
 


Test patch: