| 1 | initial version |
The multiplication c*x is not defined (notice that x is not a vector). Correspondingly, zz=c*x needs to be expressed explicitly - for example, zz=sum( cc*xx for cc,xx in zip(c,x) ).
| 2 | No.2 Revision |
The multiplication c*x is not defined (notice that x is not a vector). Correspondingly, zz=c*x needs to be expressed explicitly - for example, zz=sum( cc*xx for cc,xx in zip(c,x) ).
Also, by the same reason the result of A*x is not what is expected. It's also needs to be explicitly expressed - for example, B = [ sum( aa*xx for aa,xx in zip(row,x) ) for row in A.rows() ]
| 3 | No.3 Revision |
The multiplication c*x is not defined (notice that x is not a vector). Correspondingly, zz=c*x needs to be expressed explicitly - for example, zz=sum( cc*xx for cc,xx in zip(c,x) ).
Also, by the same reason the result of A*x is not what is expected. It's So, B=A*x also needs to be explicitly expressed - for example, B = [ sum( aa*xx for aa,xx in zip(row,x) ) for row in A.rows() ]
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.