I've recently been introduced to Python and Numpy, and am still a beginner in applying it for numerical methods. I've been performing simple 1D diffusion computations. I suppose my question is more about applying python to differential methods. I'm asking it here because maybe it takes some diff eq background to understand my problem.
My overall question : Pretty beginner question, I have a picture of a specific example case below.
What are the benefits/cons of using built-in numpy functions vs using for loops in numerical computational methods (CFD & FEA), is it absolutely necessary to write explicit for loops for time stepping sometimes? (no pun intended)
I attached a link to the short excercise I've been practicing below. Thanks for your time!
My specific code example: How could you get rid of the for loop below ?
The link for the excercise :