Comment #1 on issue 3180 by [email protected]: Evaluate expressions
containing ImmutableMatrix by default
http://code.google.com/p/sympy/issues/detail?id=3180
Lets list here the arguments pro.
In my side I write remarks and arguments contra.
Remarks:
1) By "evaluation" we can means:
- calculation meaning.
- and automatic symplification-on-the-flay.
- (no) evaluation in sense of "evaluate=True|False" kwargs.
2) We can separate printing representation of expression and sympy
expressions.
printing system can represent object as it is more readeble, but sympy
expression as it is more convinient two work symbolically with it.
E.g we can represent internally expression as 5*ImmutableMatrix(3*eye(3)).
But print, if it is confusing someone, as a desireble whole matrix.
BTW, we have analogous independent "printing evaluation" for Add:
In [1]: 2*(x+y)
Out[1]: 2⋅x + 2⋅y
In [2]: type(_)
Out[2]: sympy.core.add.Add
Arguments contra
----------------
1) When the user *construct* the symbolic expression, he can ask CAS only
to simplify this symbolic expression (automatic or not).
All evaluations in calculation meaning must be produced only by request.
2) a = 7*ImmutableMatrix(3*eye(3))
a = 5 * a.
The simple way for the symbolic calculation is to multiply common
coefficients (7*5), so the resulte will be: `35*ImmutableMatrix(3*eye(3))`.
In case of your evaluation there is a lot of unesessary multiplication.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.