mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 20:13:41 +02:00
Corr.roll method implemented
This commit is contained in:
parent
f24529eb0a
commit
f2b8a9580b
1 changed files with 5 additions and 1 deletions
|
@ -151,7 +151,6 @@ class Corr:
|
||||||
return Corr(newcontent)
|
return Corr(newcontent)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#This method will symmetrice the matrices and therefore make them positive definit.
|
#This method will symmetrice the matrices and therefore make them positive definit.
|
||||||
def smearing_symmetric(self):
|
def smearing_symmetric(self):
|
||||||
if self.N > 1:
|
if self.N > 1:
|
||||||
|
@ -176,6 +175,11 @@ class Corr:
|
||||||
sp_vec = sp_vec/np.sqrt(sp_vec@sp_vec)
|
sp_vec = sp_vec/np.sqrt(sp_vec@sp_vec)
|
||||||
return 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
|
def deriv(self, symmetric=True): #Defaults to symmetric derivative
|
||||||
if not symmetric:
|
if not symmetric:
|
||||||
newcontent = []
|
newcontent = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue