ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 23 Dec 2015 10:55:33 +0100Function with Matrix inputhttps://ask.sagemath.org/question/31787/function-with-matrix-input/ Hello Guys i have the following problem.
I want to write a function whose input is a Matrix. A small example:
def Dimension(Matrix):
n = Matrix.nrows()
return n
A = ([1,0,0],[0,1,0],[0,0,1])
print Dimension(A)
but then i get :
AttributeError: 'tuple' object has no attribute 'nrows'
How can I write i function that has an Matrix as input?bruno171092Wed, 23 Dec 2015 10:55:33 +0100https://ask.sagemath.org/question/31787/