[Numpy-discussion] sort bug

Charles R Harris charlesr.harris@gmail....
Sun Apr 29 10:19:22 CDT 2007

On 4/29/07, Anton Sherwood <bronto@pobox.com> wrote:
> > Anton Sherwood wrote:
> >     I refined it slightly:
> >
> >     val,vec = numpy.linalg.eig(adj)
> >     indx = val.argsort()[-4:-1]
> >     val = val.take(indx)
> >     vec = vec.take(indx, axis=1)
> >     master = zip(val, vec.T)
> Charles R Harris wrote:
> > But that won't get the 4  largest, and will ignore the last eigenvalue,
> > whatever it is.  . . .
> Are you making two points here or only one?
> I'm using eigenvectors of a graph's adjacency matrix as "topological"
> coordinates of the graph's vertices as embedded in 3space (something I
> learned about just recently).  Whenever I've done this with a graph that
> *does* have a good 3d embedding, using the first eigenvector results in
> a flat model: apparently the first is not independent, at least in such
> cases.  So, yeah, I really did intend to throw away the largest and use
> the next three.  Are you saying this code doesn't give me that?  The
> output of my first few test cases looks good.

Looks good, then. In your original post you were talked about the four
largest eigenvalues. Anyway, the embedding part sounds interesting, I'll
have to think about why that works.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070429/bc5dcacf/attachment.html 

More information about the Numpy-discussion mailing list