Clone wiki

piMath / Home



πMath will be a math package to implement linear algebra methods and algorithms. It aims to provide vector and matrices based on abstract classes to aid the implementation, research and debugging of numerical analysis algorithms.

The project is currently in early development stage. Some functionality is available, but a lot of things are missing (please refer to the status section for a brief description of what is available).


Using πMath the programmer should be able to develop his algorithm (test and debug) without the need to compile or install external libraries. If the algorithm needs to be optimized (e.g. memory usage, speed, accuracy) the programmer should be able to create new backends and transparently switch the vector and matrix classes to others that has these desired properties (e.g. numpy or mpmath). Ideally, this transition should take place with very small changes in the core implementation of the algorithm. πMath will attempt to approximate this ideal.

To achieve these goals the projects development will be concentrated on the following challenges:

  • Pure python -- The methods implemented using πMath should work without any dependency to external libraries or packages.
  • Dense and Sparse -- Dense and sparse matrices are natively and transparently supported
  • Transparent Multi-processing -- The package should detect and use the availability of multiple cores.
  • Wrap external libraries -- Alternative back-ends can be registered using wrapper classes in order to utilize their speed and accuracy (e.g. numpy or mpmath). In a similar manner a wrapper should be provided that would allow manipulation of matrices mapped into files (e.g. through pytables).
  • Debugging and Testing -- The library should provide classes with embedded logging and debugging capabilities to test, validate and benchmark code.