Hah. Thanks Michael and P. I first learnt Python in the 1.5 era, so there's a few of the nice new syntax features I'm still not up to speed on. Any reason why .subs doesn't accept multiple arguments? Would there be any point in requesting .subs_expr become the new default on trac?
Joal Heagney On Monday, 9 April 2012 15:39:49 UTC+10, Michael Orlitzky wrote: > > On 04/08/2012 03:33 AM, P Purkayastha wrote: > > Something like this? > > > > sage: solns = solve([f.diff(ar) for ar in f.args()],f.args(), > > solution_dict=True)[0] > > sage: f( *(solns[ar] for ar in f.args()) ) > > 0 > > The `subs_expr` method accepts multiple equations already, so you can > shave a few characters off that: > > sage: solution = solve([f.diff(ar) for ar in f.args()],f.args())[0] > sage: f(x,y).subs_expr(*solution) > 0 > > -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
