On Sun, Sep 14, 2008 at 10:17 PM, Fabrice Silva <silva@lma.cnrs-mrs.fr> wrote: > What about considering a square diagonal matrix having vector x on its > main diagonal ? > Calling X such a matrix: > X = numpy.matrix(numpy.diag(x, k=0)) Thanks folks - I think your suggestions will work. Don't know why I didn't see it myself. Cheers Robin