Corr.roll method implemented

This commit is contained in:
Fabian Joswig 2021-10-04 17:20:58 +01:00
parent f24529eb0a
commit f2b8a9580b

View file

@ -151,7 +151,6 @@ class Corr:
return Corr(newcontent)
#This method will symmetrice the matrices and therefore make them positive definit.
def smearing_symmetric(self):
if self.N > 1:
@ -176,6 +175,11 @@ class Corr:
sp_vec = sp_vec/np.sqrt(sp_vec@sp_vec)
return sp_vec
def roll(self, dt):
return Corr(list(np.roll(np.array(self.content, dtype=object), dt)))
def deriv(self, symmetric=True): #Defaults to symmetric derivative
if not symmetric:
newcontent = []