Re: [sage-support] Re: matrix function

2016-05-19 Thread Justin C. Walker
On May 19, 2016, at 01:55 , Alberto Verga wrote: > This seems to work > r = matrix(CallableSymbolicExpressionRing((theta,)), cos(theta/2)*s0 - > I*sin(theta/2)*sy) > > Are there other possibilities? I believe that your original code does not define a function. Try something like this: def r(

[sage-support] Re: matrix function

2016-05-19 Thread Alberto Verga
This seems to work r = matrix(CallableSymbolicExpressionRing((theta,)), cos(theta/2)*s0 - I*sin(theta/2)*sy) Are there other possibilities? Le jeudi 19 mai 2016 10:36:22 UTC+2, Alberto Verga a écrit : > > I want to define a matrix valued function: what is wrong with this code? > > s0 = matrix([[