1 | initial version |
Hello, @chris233! I had the same problem some time ago. Check this related questions:
The only way around this problem (as far as I know) is to use pure Python syntax for function definition (In this case, "function" in the sense of computer pŕogramming, as a synonym of "subroutine", not "function" in the mathematical sense):
def f(x):
return x * matrix([[5]])
(In my humble opinion, this is very unfortunate because mathematical function definition, like the one you intended, is a very convenient feature.)
I hope this helps!