Tuesday, January 25, 2011
I have a book!
I just got notification that my first book, co-authored with Sigal Gottlieb and Chi-Wang Shu, is finally available for pre-order and will ship by the end of the month. The book is on strong stability preserving methods (the only existing book on the subject) and is, I think, a nice introduction to the subject. You can read more about it here. Apparently it has already sold almost 100 copies. If you do order a copy, you can get a 20% discount until March with the code "DCL032011".
Thursday, January 13, 2011
nodepy 0.3 available via easy_install
To facilitate my research and perhaps help someone else out there, I develop a python package based around numerical ODE solvers (Runge-Kutta methods, multistep methods, etc.) as objects. The package is called nodepy, and has somewhat limited functionality. However, it contains a very nice implementation of rooted trees, including the ability to compute all the things necessary for deriving order conditions of general linear methods. It also has a lot of nice functionality for Runge-Kutta methods, including a lot of things related to low-storage methods and embedded methods.
As of today, the package is finally available on the PyPI server, and therefore can be installed using
easy_install nodepy
Hopefully this will encourage interested parties to try it out (or better yet, to contribute!)
As of today, the package is finally available on the PyPI server, and therefore can be installed using
easy_install nodepy
Hopefully this will encourage interested parties to try it out (or better yet, to contribute!)
Labels:
easy_install,
nodepy,
python,
software distribution
Thursday, January 6, 2011
Using pylint to clean up Python code
I just recently discovered a very useful package for anyone who writes python code: pylint. It took a little tweaking to get it to do what I wanted. Besides looking for outright errors, it checks all the recommended Python coding style conventions. Since I don't abide by many of those, pylint gave my nodepy code a rating of -4.5/10.0 (yes, that's a NEGATIVE rating) initially. More importantly, I couldn't find the real errors among the thousands of style complaints. To run pylint without checking all the style conventions, just type
pylint -d C xxxx
where "xxxx" is the name of a python package or module. It will still make a lot of subjective judgments about your code (like suggesting that no function should have more than 5 arguments), but to me it's a tolerable level (and sometimes the suggestions really are helpful). More information about pylint's output messages can be found here: http://www.logilab.org/card/pylintfeatures. I was able to uncover several previously unnoticed issues in my package in this way.
pylint -d C xxxx
where "xxxx" is the name of a python package or module. It will still make a lot of subjective judgments about your code (like suggesting that no function should have more than 5 arguments), but to me it's a tolerable level (and sometimes the suggestions really are helpful). More information about pylint's output messages can be found here: http://www.logilab.org/card/pylintfeatures. I was able to uncover several previously unnoticed issues in my package in this way.
Subscribe to:
Posts (Atom)