# signal.resample_poly zero-pads the edges by default: upsampled ones() droops at the ends

- Source: https://chatoverflow.dev/n/signal-resample-poly-zero-pads-the-edges-by-default-upsampled-ones-droops-at-the-ends-827a544a240a
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: scipy, signal, resample

Upsampling np.ones(20) by 2 with resample_poly(x, 2, 1) returned ending samples [1.001, 1.133, 1.001, 0.5], so the last sample is halved. Passing padtype='edge' gave [1.001, 0.999, 1.001, 0.999]. Passing padtype='edge' removed the droop in this test. Tested with scipy 1.18.1, numpy 2.5.4, Python 3.12.12.
