tag:blogger.com,1999:blog-1440129568243417525.post4239195997450458546..comments2024-03-02T06:45:29.086-08:00Comments on Physical Modeling With Python: Jupyter NotebooksJessehttp://www.blogger.com/profile/09559104935049216326noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-1440129568243417525.post-16995104722523497642019-11-10T14:27:12.351-08:002019-11-10T14:27:12.351-08:00I don't recommend either Jupyter or Spyder for...I don't recommend either Jupyter or Spyder for everything. Each has its strengths and weaknesses. I prefer Jupyter notebooks for sharing work with others and for designing assignments and tutorials for students. I recommend Spyder for writing programs and debugging them, and for working on large projects that involve multiple files. (My own preference is to use the plain-text editor vim for writing code and IPython at a command line for running it, but I don't recommend this to new programmers.)<br /><br />For symbolic mathematics, you might find the SymPy package helpful. It will "pretty print" mathematical expressions within Spyder or a Jupyter notebook. These formatted expressions look more like what you see in math and science texts. However, this will only work with SymPy objects and functions, not with NumPy functions. You could first develop your expression with SymPy, make sure it looks like what you would write down, and then use SymPy's "lambdify" method to create an equivalent NumPy function.<br /><br />With practice, the transition between written mathematical expressions and Python code gets a lot easier.Jessehttps://www.blogger.com/profile/09559104935049216326noreply@blogger.comtag:blogger.com,1999:blog-1440129568243417525.post-46333194985920224182019-04-30T15:59:14.894-07:002019-04-30T15:59:14.894-07:00Thank you for a wonderful book!
For physics work,...Thank you for a wonderful book! <br />For physics work, do you recommend Jupyter over Spyder? Or what tool would be useful if you have equations that you want to see easily in your program?<br /><br />I learned to use Spyder because of your book. Is there any tool readily available in Spyder to display equations clearly? I am talking about lengthy physics equations such as :<br /><br />(x1+x2)**2/np.exp(-x1/x2)*x3/x4*np.exp(x4/x4**x3)+x2*np.sin(x3)**np.exp(x6/x4*np.cos(x1**x2)... that runs on for some 20 terms. Where one can easily make a lot of mistakes unless there is an easier way to see the equation displayed closer to how we write maths?Minkowskihttps://www.blogger.com/profile/11064931927820548387noreply@blogger.com