Function of doit(deep = False)

25 views
Skip to first unread message

Lokesh Sharma

unread,
Feb 25, 2015, 12:17:23 PM2/25/15
to sy...@googlegroups.com
Please suggest something about these ideas:

1. doit(deep = False)
2. doit(deep = True)
3. Function call with no doit()

Specifically, what should be the output of the following:

Let X = Matrix([[1, 2, 3]]*3),
Y = MatrixSymbol('Y', 3, 3)

1. Adjoint(X, 2*X, Y, -3*Y), Trace(X, 2*X, Y, -3*Y), Transpose(X, 2*X, Y, -3*Y)
2. The above calls with .doit(deep = False)
3. The above calls with .doit(deep = True)


This is necessary in order to solve an issue I am having on implementation of Trace function over here:
https://github.com/sympy/sympy/pull/9031#issuecomment-74974127

Thanks!


Colin Macdonald

unread,
Feb 25, 2015, 12:57:30 PM2/25/15
to sy...@googlegroups.com
On 25/02/15 11:38, Lokesh Sharma wrote:
> 1. Adjoint(X, 2*X, Y, -3*Y), Trace(X, 2*X, Y, -3*Y), Transpose(X, 2*X, Y,
> -3*Y)
> 2. The above calls with .doit(deep = False)
> 3. The above calls with .doit(deep = True)

Those make no sense and should just be errors (which they are). Perhaps
you wanted a MatAdd?

Colin



signature.asc

Lokesh Sharma

unread,
Feb 25, 2015, 4:10:47 PM2/25/15
to sy...@googlegroups.com
Oh no!, Sorry! it should be with MatAdd.

So, they become as follows


Let X = Matrix([[1, 2, 3]]*3),
Y = MatrixSymbol('Y', 3, 3)
q = MatAdd(X, 2*X, Y, -3*Y)

1. Adjoint(q), Trace(q), Transpose(q)

2. The above calls with .doit(deep = False)
3. The above calls with .doit(deep = True)


Reply all
Reply to author
Forward
0 new messages