Disclaimer: I don't know very much about linear algebra in sympy.
I think if you are writing a library (like the GA module) which you
forsee being used in both dense and sparse situations, then you should
try to rely on libraries which work well with both dense and sparse
situations.
What I am saying here is that you should not define your own
representations of a vector / linear transformation, but rather re-use
the classes from the matrices module, which ideally should have both
dense and sparse implementations.
Of course this may not be a very practical advice, in which case ignore
it :-).
Best,
Tom
On 14.04.2013 13:33, Alan Bromborsky wrote:
Let e_i's be non-commutative symbols so a vector is
a = a_1*e_1+...a_n*e_n
and let L be a linear transformation defined by
L(e_i) = b_i1*e_1+...+b_in*e_n
Would it be faster to calculate L(a) via matrices or dictionaries -
L_dict = {e_1:L(e_1),...,e_n:L(e_n)}
L(a) = a.subs(L_dict)
For example would a dictionary be better for the case of a sparse matrix?
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.