def generate_fdtd(expr, nsolve): w = Wild('w') expr0 = expr.lhs - expr.rhs expr1 = expr0.expand() # this doesn't work to collect terms at timestep (n+1) print collect(expr1, p[w,w,n+1])
Pardon the unintentional indent, so the function should be: def generate_fdtd(expr, nsolve): w = Wild('w') expr0 = expr.lhs - expr.rhs expr1 = expr0.expand() # this doesn't work print collect(expr1, p[w,w,n+1]) Nicholas -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.