mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-10-09 05:46:20 +02:00
[NumCS] Finish PCA
This commit is contained in:
1 parent
2151deb491
commit
e909c263e7
4 files changed
+86
-7
No files matched your search
@@ -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