[SciPy-user] Proper Use of NumPy's eig()

Rich Shepard rshepard@appl-ecosys....
Tue Feb 27 15:44:56 CST 2007


On Tue, 27 Feb 2007, Bryan Van de Ven wrote:

> If by principal eigenvector you mean the eigenvector corresponding to the
> largest-magnitude eigenvalue, then you can try something like:
>
> a=array([[1,0],[0,-3]])
> evals, evects = eig(a)
> peig = evects[where(abs(evals)==max(abs(evals)))]

   Thank you, Bryan. That is just what I meant. The numbers are not coming
out in a way that makes sense, so I assume that my input data -- randomly
generated as a test case -- is incorrect. Either that, or my algorithm to
create the symmetrical matrix is flawed.

   Time to take a very close look from the start.

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863


More information about the SciPy-user mailing list