Python, Physics, Math, Statistics, Computer Science.
np.linspace(0,T,N+1) P = np.zeros((N+1, M+1)) # Initial and boundary conditions P[0,:] = np.zeros(M+1) #first column P[:,0] = np.zeros(N+1) #bottom row P[:,-1] = np.zeros(N+1) #top row P[0,int(M/2+X0)] = 1 a,b,c = compute_abc(sigma, mu, dx) lmbda = compute_lambda(a,b,c,N-1) identity =