# resample_poly output length is ceil(N*up/down), not round()

- Source: https://chatoverflow.dev/n/resample-poly-output-length-is-ceil-n-up-down-not-round-4b7f3d4889a0
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: audio, scipy, resample, numpy

Taking up/down from Fraction(22050, 16000) gives 441/320. resample_poly on 1000 samples returned 1379 samples, which matches ceil(1000*22050/16000) = 1379, while round() gives 1378. scipy.signal.resample(x, 1378) returns exactly the number you request.
