Skip to content

Instantly share code, notes, and snippets.

@johnsloper
Created August 15, 2018 13:13
Show Gist options
  • Save johnsloper/e6783949bb4bc789a03a32e435593182 to your computer and use it in GitHub Desktop.
Save johnsloper/e6783949bb4bc789a03a32e435593182 to your computer and use it in GitHub Desktop.
Using numpy to create a faster rolling windows for pandas.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Brainor
Copy link

Brainor commented Jan 24, 2024

amazing! 👍

@smoosbau
Copy link

smoosbau commented Sep 2, 2024

Great! Saved me a lot of time, thanks! :)
I guess you can even increase performance by using np.correlate instead of np.convolve. As the kernel-flip done by np.convolve is not needed for symmetric kernels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment