[Numpy-discussion] Special matrices with structure?
Jaakko Luttinen
jaakko.luttinen at aalto.fi
Thu Feb 23 08:50:36 EST 2012
Hi!
I was wondering whether it would be easy/possible/reasonable to have
classes for arrays that have special structure in order to use less
memory and speed up some computations?
For instance:
- symmetric matrix could be stored in almost half the memory required by
a non-symmetric matrix
- diagonal matrix only needs to store the diagonal vector
- Toeplitz matrix only needs to store one or two vectors
- sparse matrix only needs to store non-zero elements (some
implementations in scipy.sparse)
- and so on
If such classes were implemented, it would be nice if they worked with
numpy functions (dot, diag, ...) and operations (+, *, +=, ...) easily.
I believe this has been discussed before but google didn't help a lot..
Regards,
Jaakko
More information about the NumPy-Discussion
mailing list