mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 20:13:41 +02:00
linting tested again
This commit is contained in:
parent
2f11d0d30b
commit
909ef85ff8
1 changed files with 65 additions and 87 deletions
|
@ -678,8 +678,6 @@ class Corr:
|
|||
|
||||
content_string += "Corr T=" + str(self.T) + " N=" + str(self.N) + "\n" # +" filled with"+ str(type(self.content[0][0])) there should be a good solution here
|
||||
|
||||
|
||||
|
||||
if self.tag is not None:
|
||||
content_string += "Description: " + self.tag + "\n"
|
||||
if self.N != 1:
|
||||
|
@ -687,7 +685,6 @@ class Corr:
|
|||
# This avoids a crash for N>1. I do not know, what else to do here. I like the list representation for N==1. We could print only one "smearing" or one matrix. Printing everything will just
|
||||
# be a wall of numbers.
|
||||
|
||||
|
||||
if range[1]:
|
||||
range[1] += 1
|
||||
content_string += 'x0/a\tCorr(x0/a)\n------------------\n'
|
||||
|
@ -917,20 +914,6 @@ class Corr:
|
|||
return self._apply_func_to_corr(return_imag)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def sort_vectors(vec_set, ts): # Helper function used to find a set of Eigenvectors consistent over all timeslices
|
||||
reference_sorting = np.array(vec_set[ts])
|
||||
N = reference_sorting.shape[0]
|
||||
|
@ -955,25 +938,20 @@ def sort_vectors(vec_set, ts): # Helper function used to find a set of Eigenvect
|
|||
else:
|
||||
sorted_vec_set.append(vec_set[t])
|
||||
|
||||
|
||||
return sorted_vec_set
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def permutation(lst): # Shamelessly copied
|
||||
if len(lst) == 1:
|
||||
return [lst]
|
||||
l = []
|
||||
ll = []
|
||||
for i in range(len(lst)):
|
||||
m = lst[i]
|
||||
remLst = lst[:i] + lst[i + 1:]
|
||||
# Generating all permutations where m is first
|
||||
for p in permutation(remLst):
|
||||
l.append([m] + p)
|
||||
return l
|
||||
ll.append([m] + p)
|
||||
return ll
|
||||
|
||||
|
||||
def GEVP_solver(Gt, G0): # Just so normalization an sorting does not need to be repeated. Here we could later put in some checks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue