1 | initial version |
If you ask for the type of $f$, you get <ππ’ππ'ππππ.ππ’ππππππ.ππ‘ππππππππ.π΄π‘ππππππππ'>
: apparently the substitution into symbolic expressions is not overloaded to matrix-valued functions. However, with
var('x y')
f = matrix(SR, [[sin(x)],[cos(x)]])
type(f)
you get <ππ’ππ'ππππ.ππππππ‘.ππππππ‘β―ππ’ππππππβ―πππππ.πΌπππππ‘β―ππ’ππππππβ―πππππ'>
, and
f(x=x+y)
gives the expected result.
2 | No.2 Revision |
If you ask for the type of $f$, you get <ππ’ππ'ππππ.ππ’ππππππ.ππ‘ππππππππ.π΄π‘ππππππππ'>
: apparently the substitution into symbolic expressions is not overloaded to matrix-valued functions. However, with
var('x y')
f = matrix(SR, [[sin(x)],[cos(x)]])
type(f)
you get <ππ’ππ'ππππ.ππππππ‘.ππππππ‘β―ππ’ππππππβ―πππππ.πΌπππππ‘β―ππ’ππππππβ―πππππ'>
, and
f(x=x+y)
gives the expected result.
Alternatively, try with:
def f(x): return matrix(SR, [[sin(x)],[cos(x)]])
to obtain an object $f$ of type 'function'
.