delta = sp.dot(sp.transpose(Vprime - V), Vprime - V) return psi import solutions as sol prob11, prob12 = Problem1Real() prob2 = Problem2Real() prob3 = Problem3Real() x, y = sol.Problem1() if (np.allclose(prob11, x) and np.allclose(prob12, y)): print("Problem1 Passed") else: print("Problem1 Falied") x = sol.Problem2() if (np.allclose(prob2, x)): print("Problem2 Passed") else: print("Problem2 Falied") x = sol.Problem3() if (np.allclose(prob3, x)): print("Problem3 Passed") else: print("Problem3 Falied")
print(prob12) x, y = sol.Problem2() if (np.allclose(prob21, np.array(x)) and np.allclose(prob22, y)): print("Problem2 Passed") else: print("Problem2 Falied") print("Your answer:") print(x) print(y) print("Correct answer:") print(prob21) print(prob22) x, y = sol.Problem3() if (np.allclose(prob31, np.array(x)) and np.allclose(prob32, y)): print("Problem3 Passed") else: print("Problem3 Falied") print("Your answer:") print(x) print(y) print("Correct answer:") print(prob31) print(prob32) x, y = sol.Problem4() if (np.allclose(prob41, np.array(x)) and np.allclose(prob42, y)):