Re: [Numpy-discussion] svd headers and diagonals

2007-05-06 Thread dpn
Somehow your suggestion made me think about using diag, Thanks :) >>> mm(u,mm(numpy.diag(s),v)) matrix([[ 4., 2.], [ 2., 4.]]) Now if anyone knows how to set headers for matrices or arrays? dpn On 5/6/07, Matthieu Brucher <[EMAIL PROTECTED]> wrote: > Don't forget that '*' is element-wi

Re: [Numpy-discussion] svd headers and diagonals

2007-05-06 Thread Matthieu Brucher
Don't forget that '*' is element-wise for arrays, use dot instead ;) Matthieu 2007/5/6, dpn <[EMAIL PROTECTED]>: Hi, i have two questions, both loosely related to SVD. I've seen this post: http://thread.gmane.org/gmane.comp.python.numeric.general/4575 >>> u,s,v = numpy.linalg.svd(numpy.array

[Numpy-discussion] svd headers and diagonals

2007-05-06 Thread dpn
Hi, i have two questions, both loosely related to SVD. I've seen this post: http://thread.gmane.org/gmane.comp.python.numeric.general/4575 >>> u,s,v = numpy.linalg.svd(numpy.array([[4,2],[2,4]])) # symmetric matrix u == v >>> u array([[-0.70710678, -0.70710678], [-0.70710678, 0.70710678]]