Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4cb64c commit 5ae6f0dCopy full SHA for 5ae6f0d
numpy/finite-difference/solution/finite-difference.py
@@ -12,8 +12,8 @@
12
13
# Compare to cos. Note that derivative was not defined in end points
14
f_ref = np.cos(xi[1:-1])
15
-print("Mean squared difference:")
16
-print(np.sqrt(np.sum((dfi - f_ref)**2)))
+print("Root mean squared difference:")
+print(np.sqrt(np.mean((dfi - f_ref)**2)))
17
plt.plot(xi[1:-1], dfi, label="sin'")
18
plt.plot(xi[1:-1], f_ref, label="cos")
19
plt.legend()
0 commit comments