-
-
Save justinhou95/b1cc7fe52ce0b3a963f7e1fcf59dfa11 to your computer and use it in GitHub Desktop.
This file contains 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 | |
from scipy.interpolate import BPoly | |
import matplotlib.pyplot as plt | |
def ber_approx(f,N): | |
x_grid = np.linspace(0,1,N+1) | |
y_grid = f(x_grid) | |
bp = BPoly(y_grid[:,None], [0, 1]) | |
return bp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment