Hi folks,
I am currently writing a code which uses a matrix in a
previously defined function written in the same sage window, but I
keep on getting this error message : TypeError: unable to coerce
<type
'sage.matrix.matrix_integer_dense.Matrix_integer_dense'> to an
integer.
thank you for your time.
Kind Regards
Chappman
my code is this :
def U(N,M):
U=matrix(ZZ,N*M)
for i in range(N*M):
for j in range(N*M):
U[i,j]=1
return U
def Q(N,M):
Q=matrix(ZZ,N*M)
for i in range(N*M):
for j in range(N*M):
Q[i,j]=U(N,M)
return Q
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org