| 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!
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.