Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why `unable to convert (sin(h(x)), cos(h(x))) to a symbolic expression`?

f(x) = (sin(x), cos(x))
h = function('h', nargs=1)
f(h(x))

works fine and produces (sin(h(x)), cos(h(x))). However, if I try to assign that to a function:

g(x) = f(h(x))
TypeError: unable to convert (sin(h(x)), cos(h(x))) to a symbolic expression

How can I compose functions like this?