> Does this what you want? > > sage: R=ZZ['x1','x2','x3'] > sage: S=ZZ[R.gens()+('x4','x5')] > sage: M=matrix(R,[1,2,3]) > sage: M.change_ring(S) > [1 2 3] > > Variable names actually matter in sage, so there is automatically a > coercion from R into S. > > > That does EXACTLY what I want, but now I run into a bug:
R1 = ZZ['x0','x1'] x = R1(1) R2 = ZZ[tuple('x'+str(i) for i in range(967))] y = R2('x0') x*y gives a RuntimeError: maximum recursion depth exceeded. The 967 is the smallest number in the Notebook that gives an error; on the command line the error shows up a little sooner even. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.