Skip to content

Instantly share code, notes, and snippets.

View wmwv's full-sized avatar

Michael Wood-Vasey wmwv

View GitHub Profile
@wmwv
wmwv / lanczos.py
Last active May 8, 2023 01:36
Lanczos interpolation in 1 D on a discrete grid.
"""Lanczos interpolation (resampling): 1D.
Written by Michael Wood-Vasey
based on https://en.wikipedia.org/wiki/Lanczos_resampling
"""
from __future__ import division, print_function
import numpy as np
def lanczos_kernel(x, order):