I see two problems that you're hitting. First, the routines act on an array. Your comment "values beyond the boundary of the signal are NOT zeros" implies that you want to process a continuous signal, or at least one that is longer than a single call and array. Second, the available routines can only up and down sample by integer factors. Clearly, the above routines aren't suited to your purpose. For the first problem you really need an object that can keep track of history as you send it additional "buffers" (arrays) of data, not simply a function. For the second problem, you need an approach that isn't locked into integer factors. There must be Python libraries that do what you want, it's not difficult. I'll let you do a web search. I happen to have seen this one, but I haven't used it: http://ajaxsoundstudio.com/software/pyo/. The basic idea of conversion is that the conversion process produces one sample at a time, given access to a certain amount of history. Your input maybe coming from buffers of a certain size, your output may require you to fill buffers of that size, and the history requirements of the filter may be at a different size, so a good deal of the work is understanding the buffer management. You're looking for "a simple way", so I think you'll be researching Python DSP libraries. But I'll elaborate on the integer factor issue. Converting rate by integer factors is easy to understand and implement—insert zeros to go up, discard samples to go down. DSP books often present this as the only option. But every sample in your source is an impulse. Filtering it with a linear phase FIR antialiasing filter produces a windowed sinc function. You can the windowed sinc functions of all the necessary points anywhere you want. There is no need to do it on integer multiples or divisions of the sample period.