[Python-ideas] matrix operations on dict :)
sturla at molden.no
Tue Feb 7 19:19:36 CET 2012
On 06.02.2012 21:01, julien tayon wrote:
> Proposing vector operations on dict, and acknowledging there was an
> homeomorphism from rooted n-ary trees to dict, was inducing the
> possibility of making matrix of dict / trees.
> Since, linear algebrae on dict was coldly welcomed, I waited to have
> some code to back me up to push my reasoning furhter, and it happily
> worked the way books predicted.
Why would you want to use a hash table (Python dict) for linear algebra?
Not sure I can think of a worse datastructure for the purpose.
There are NumPy...
And in the standard library there is an array module...
For matrix multiplication you can use DGEMM from any LAPACK library if
you don't like NumPy (e.g. by means of ctypes).
What really should be discussed is inclusion of NumPy in the standard
library (that is NumPy, not SciPy).
More information about the Python-ideas