Re: matrix Multiplication

2006-10-18 Thread Sssasss
Roberto Bonvallet wrote: > Sssasss wrote: > > hi evrybody! > > > > I wan't to multiply two square matrixes, and i don't understand why it > > doesn't work. > > Could you explain me? > > > > def multmat(A,B): > >"A*B&qu

Re: matrix Multiplication

2006-10-18 Thread Sssasss
David wrote: > Il 18 Oct 2006 04:17:29 -0700, Sssasss ha scritto: > > > hi evrybody! > > > > I wan't to multiply two square matrixes, and i don't understand why it > > doesn't work. > Can I suggest a little bit less cumbersome algorithm? > >

Re: matrix Multiplication

2006-10-18 Thread Sssasss
Fredrik Lundh wrote: > "Sssasss" wrote: > > > I wan't to multiply two square matrixes, and i don't understand why it > > doesn't work. > > > > def multmat(A,B): > >"A*B" > >if len(A)!=len(B): return "error&q

matrix Multiplication

2006-10-18 Thread Sssasss
hi evrybody! I wan't to multiply two square matrixes, and i don't understand why it doesn't work. Could you explain me? def multmat(A,B): "A*B" if len(A)!=len(B): return "error" D=[] C=[] for i in range(len(A)): D.append(0) for i in range(len(A)): C.append(D) for i in