How remove deprecation warning when substituting expressions in this snippet?

15 views
Skip to first unread message

Chris Seberino

unread,
Jul 14, 2017, 7:21:50 PM7/14/17
to sage-support
I've tried lots of variations of the following to replace a product of functions with y.  They all give the error at the bottom in Sagecell.  How fix?

var("y")
f = function("f")(x)
g = function("g")(x)
eqtn = f(x) * g(x) + 4*f(x)^2 * g(x) == 0
eqtn = eqtn.substitute({f(x) * g(x) : y})
show(eqtn)

/home/sc_serv/sage/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py:2881: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...)
  exec(code_obj, self.user_global_ns, self.user_ns)

Nils Bruin

unread,
Jul 14, 2017, 7:39:28 PM7/14/17
to sage-support

Just define
 
f = function("f")
g = function("g")

instead
Reply all
Reply to author
Forward
0 new messages