Ask Your Question

Revision history [back]

You have to use the method apply_map() in order to perform the substitution on each component of the vector field:

sage: vf.apply_map(lambda cmp: cmp.subs(a==1))                                                      
sage: vf.display()                                                                                  
e_x + x e_y + x*y e_z

See the documentation of apply_map() for more details.