This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last change: 2006 Nov 16 | |
""" FROM https://realpython.com/blog/python/vim-and-python-a-match-made-in-heaven/ | |
set nocompatible " required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
def mean_filt(x, n): | |
tent = np.concatenate((np.arange(1, 1+n//2 + n%2), np.arange(1, 1+n//2)[::-1])) | |
tent = tent/sum(tent) | |
return np.convolve(x, tent, mode='same') | |