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(theta): return cos(theta/2)*s0 - I*sin(theta/2)*sy Check the doc at python.org (function definition, ...). HTH Justin -- Justin C. Walker, Curmudgeon-At-Large, Director Institute for the Enhancement of the Director's Income -------- The path of least resistance: it's not just for electricity any more. -------- -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.