Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?