Created
August 12, 2017 19:39
-
-
Save ultimatile/72cf9de81da3c42775b90d0991273fa9 to your computer and use it in GitHub Desktop.
script to extract an eigenvector from HΦ output binary data as numpy.ndarray
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
with open('CHECK_Memory.dat') as f: | |
dim= f.read() | |
dimH= int(dim[25:-53]) | |
dimvec=dimH+1 | |
dvec=[("{}".format(i), np.complex128) for i in np.arange(dimvec)] | |
dvec=[('lan', np.int32),('hil', np.uint64)]+dvec | |
data=np.fromfile("zvo_eigenvec_0_rank_0.dat",dtype=np.dtype(dvec)) | |
print(np.array(list(data[0]))[3:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment