Second initial import
This commit is contained in:
@@ -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]
|
||||
|
Reference in New Issue
Block a user