All,
What's the quickest way to create a diagonal matrix ? I already have the
elements above the main diagonal. Of course, I could use loops:
>>>m=5
>>>z = numpy.arange(m*m).reshape(m,m)
>>>for k in range(m):
>>> for j in range(k+1,m):
>>> z[j,k] = z[k,j]
But I was looking for something more efficient.
Thanks a lot in advance !