[Numpy-discussion] sorting ndarray

2008-04-03 Thread harryos
i have a 1 dim numpy array D=array( [[ 3. , 2. , 1. , 4. , 5. , 1.5, 2.2]] ) i need to get this sorted in descending order and then access the elements . D.sort() will make D as [[ 1. 1.5 2. 2.2 3. 4. 5. ]] how will i reverse it? or is there a simpler way? harry

[Numpy-discussion] coding Turk&Pentland equation

2008-04-02 Thread harryos
ould i calculate the weight space from this ?should i do W=dot(U[:m,:],(L-Psi).transpose() ) do i have to transpose this result again? thanks harryos ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] newbie doubt about dot()

2008-04-01 Thread harryos
to apply the above formula how can i find the matrix where wk is an element.? I know i have to use dot() but the rest i am finding a bit confusing can someone please help? harryos ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http

Re: [Numpy-discussion] confusion about eigenvector

2008-03-29 Thread harryos
> - > from scipy import linalg > facearray-=facearray.mean(0) #mean centering > u, s, vt = linalg.svd(facearray, 0) > scores = u*s > facespace = vt.T > # reconstruction: facearray ~= dot(scores, facespace.T) > explained_variance = 100*s.cumsum()/s.sum() hi i am a newbie in this area o