mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-03-14 23:10:03 +01:00
[NumCS] Finish PCA
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
def simpson(f, a, b, N):
|
||||
x, h = np.linspace(a, b, 2 * int(N) + 1, retstep=True)
|
||||
I = h / 3.0 * (np.sum(f(x[::2])) + 4.0 * np.sum(f(x[1::2])) + f(x[0]) - f(x[-1]))
|
||||
return I
|
||||
|
||||
Reference in New Issue
Block a user