Re:The Easy Way To Solve Equations In Python
by anonymouz on Wednesday January 16, 2013 @11:41AM
(#5067554)
I think the article would better be described as "Basic methods for numerically solving equations". It gives a nice introduction to a number of those methods, and is really not Python specific as the code can easily be ported to any other language. I would view it as a way to learn the methods, rather than how to actually solve an equation in a program.
Re:The Easy Way To Solve Equations In Python
by barakstout on Wednesday January 16, 2013 @11:47AM
(#5067582)
If it was more focused on math I would agree. However, the focus is on the solution rather the technique. It is a nice refresher to those who have seen the information before.
Re:The Easy Way To Solve Equations In Python
by barakstout on Wednesday January 16, 2013 @10:51AM
(#5067285)
The easy way to solve the equation is to send it to wolfram alpha and wait for a result. I think the intention was to not use anything beside standard library. Using the R language is equivalent to using NumPy, SciPy or any other tool. As for the Python version, I have no clue why he uses 2.6. I found that all the code runs perfectly well on 2.7. That is something you should point out to the author.
Re:The Easy Way To Solve Equations In Python
by csense on Wednesday January 16, 2013 @03:10PM
(#5068760)
You missed the point of the article. It's not what version of Python he's using or what libraries already exist. It's about creating an understanding of simple methods for numerically solving equations.
> Isn't Python 2.7 the version usually used
Yes. But because the 2.x series is backward compatible, you will be able to run 2.6 code on 2.7. Honestly, if he was writing on 2.7 the code probably would look identical. For that matter, it would probably look identical on Python 3, except for print statements.
> using the R language
I'm not familiar with R, I always thought it was more for statistics like curve fitting or ANOVA. (I actually am not really sure what ANOVA is, but stats people seem to like that word, so I'll toss it out there.) Sage [1] would be the tool I'd turn to for symbolic equation solving.
Re:The Easy Way To Solve Equations In Python
by njharman on Wednesday January 16, 2013 @12:28PM
(#5067856)
> Isn't Python 2.7 the version usually used by those
Not necessarily.
Re:The Easy Way To Solve Equations In Python
by barakstout on Wednesday January 16, 2013 @12:36PM
(#5067925)
I think anything above 2.6 is fair game. Then again, it depends on the system. I have been forced before to develop in python 2.4 and less for specific platforms.
Then I noticed that there was no mention at all of the various ways of using the R language with Python (RPy, etc.).
The easy way to solve equations in Python (or any other language for that matter) would be to take full advantage of the work that other bright people have done.