Home › Processing API Reference › Resampling Resampling¶ resample() Resample a lead to a different sample rate ecgdatakit.processing.resample(lead, target_rate, *, fs=None)[source]¶ Resample a lead to a different sample rate. Uses polyphase rational resampling (scipy.signal.resample_poly) which preserves signal content up to the Nyquist frequency of the lower sample rate. Parameters: lead (Lead | ndarray[tuple[Any, ...], dtype[double]]) – Input ECG lead or raw signal array. target_rate (int) – Desired output sample rate in Hz. fs (int | None) – Sample rate in Hz. Required when lead is a numpy array. Return type: Lead