Second initial import

This commit is contained in:
2007-10-26 13:36:05 +00:00
parent 67d6d01f7f
commit 5b91e2d809
4 changed files with 596 additions and 23 deletions

View File

@@ -201,16 +201,16 @@ def eigen(A,k=6,M=None,ncv=None,which='LM',
dr=sb.zeros(k+1,typ)
di=sb.zeros(k+1,typ)
zr=sb.zeros((n,k+1),typ)
dr,di,z,info=\
dr,di,zr,info=\
eigextract(rvec,howmny,sselect,sigmar,sigmai,workev,
bmat,which,k,tol,resid,v,iparam,ipntr,
workd,workl,info)
# make eigenvalues complex
d=dr+1.0j*di
d=(dr+1.0j*di)[:k]
# futz with the eigenvectors:
# complex are stored as real,imaginary in consecutive columns
z=zr.astype(typ.upper())
z=zr.astype(typ.upper())[:,:k]
for i in range(k): # fix c.c. pairs
if di[i] > 0 :
z[:,i]=zr[:,i]+1.0j*zr[:,i+1]