I want to replace the brackets, but to add commas after each matrix-element, except the last ones in the rows.
I get only the first part.
Is there an elementary way to add commas?
m = matrix([[0,0,1], [1,0,0]])
mymatrix = m.str().replace('[', '').replace(']', '') # replace [, ]
#.... # add commas
print mymatrix
Out:
0 0 1
1 0 0