linting tested again

This commit is contained in:
JanNeuendorf 2022-01-18 16:46:14 +01:00
parent 2f11d0d30b
commit 909ef85ff8

View file

@ -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