PyLinear

PyLinear

Update: PyLinear is deprecated. Its place is taken by numpy together with PyUblas and PyUblasExt.

PyLinear is a comprehensive linear algebra library for Python. It wraps Boost UBlas into a Numeric-like shell, while adding bindings to UMFPACK, ARPACK and LAPACK and a collection of home-grown algorithms such as preconditioned CG, preconditioned BiCGSTAB and more. It is mature, but has a few rough edges in the build process. It's a bit short on the documentation side of things.

Requires Boost.Python, Boost.UBlas, Boost bindings from the Boost sandbox, BLAS, LAPACK, UMFPACK and ARPACK. Many of these dependencies will become optional in a future version. There is also some rudimentary documentation in PDF form, which I hope will be helpful. This package was written as part of my Diplom thesis and considerably extended thereafter.

Download or get the newest version directly from the source control repository.

Having trouble? Check the forum.

Forums!

Since I've received a number of calls for help with regard to my software packages, in particular MeshPy and PyLinear, I've decided to create a public forum for these requests for help. Here they are: the MeshPy forum and the PyLinear forum.

Here's to years of useful discussions! ;)

GCC 4.1 breaks Pylinear

If you get errors like

multiple definition of 
`_ZN5boost7numeric5ublas21scalar_divides_assignIT_T0_E8computedE'

when compiling PyLinear, it is because of this GCC bug, and it's quite likely that you are using GCC 4.1. Supposedly, this will be fixed in GCC 4.2. This bug will likely also affect other UBLAS applications.

The suggested workaround is to use GCC 4.0.

UPDATE: Everything seems fine in at least Debian's gcc package of version 4.1.1-11.

Rattle back, Rattleback!

As part of the course requirements for the mechanics class I took, a team of which I was a part designed a Rattleback. A rattleback is a top that appears to have a preferred direction of rotation, i.e. if you start spinning it the wrong way, it (unintuitively) will turn around and spin "the right way". There's quite a bunch more to know about the physics [1] of it, if you care. It might also be an interesting dynamical system to study, as little is known about it past what can be found by numerical simulations. Speaking of numerical simulations, if you are a student of EN137 after me and would like to take a peek at our simulation code (which was written in Octave, with a bit of PyLinear sprinkled in), be my guest.

In any case, you may view the NOT FOUND: rattleback.avi=video of our rattleback to see for yourself!

PS: I blatantly stole the title of this entry from one of the other teams. :)

[1] A. Garcia, M. Hubbard Spin Reversal of the Rattleback: Theory and Experiment Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences, Vol. 418, No. 1854 (Jul. 8, 1988) , pp. 165-197