docs: typos in docstrings corrected

This commit is contained in:
Fabian Joswig 2021-11-15 11:13:12 +00:00
parent 24ef100197
commit b937ef04bb
4 changed files with 13 additions and 13 deletions

View file

@ -14,7 +14,7 @@ class Corr:
Everything, this class does, can be achieved using lists or arrays of Obs. Everything, this class does, can be achieved using lists or arrays of Obs.
But it is simply more convenient to have a dedicated object for correlators. But it is simply more convenient to have a dedicated object for correlators.
One often wants to add or multiply correlators of the same length at every timeslice and it is inconvinient One often wants to add or multiply correlators of the same length at every timeslice and it is inconvenient
to iterate over all timeslices for every operation. This is especially true, when dealing with smearing matrices. to iterate over all timeslices for every operation. This is especially true, when dealing with smearing matrices.
The correlator can have two types of content: An Obs at every timeslice OR a GEVP The correlator can have two types of content: An Obs at every timeslice OR a GEVP
@ -317,7 +317,7 @@ class Corr:
Parameters Parameters
---------- ----------
symmetric : bool symmetric : bool
decides whether symmertic of simple finite differences are used. Default: True decides whether symmetric of simple finite differences are used. Default: True
""" """
if not symmetric: if not symmetric:
newcontent = [] newcontent = []
@ -415,7 +415,7 @@ class Corr:
return np.arccosh(Corr(newcontent, padding_back=1, padding_front=1)) return np.arccosh(Corr(newcontent, padding_back=1, padding_front=1))
else: else:
raise Exception('Unkown variant.') raise Exception('Unknown variant.')
def fit(self, function, fitrange=None, silent=False, **kwargs): def fit(self, function, fitrange=None, silent=False, **kwargs):
"""Fits function to the data """Fits function to the data
@ -433,7 +433,7 @@ class Corr:
if self.N != 1: if self.N != 1:
raise Exception("Correlator must be projected before fitting") raise Exception("Correlator must be projected before fitting")
# The default behaviour is: # The default behavior is:
# 1 use explicit fitrange # 1 use explicit fitrange
# if none is provided, use the range of the corr # if none is provided, use the range of the corr
# if this is also not set, use the whole length of the corr (This could come with a warning!) # if this is also not set, use the whole length of the corr (This could come with a warning!)
@ -451,7 +451,7 @@ class Corr:
return result return result
def plateau(self, plateau_range=None, method="fit"): def plateau(self, plateau_range=None, method="fit"):
""" Extract a plateu value from a Corr object """ Extract a plateau value from a Corr object
Parameters Parameters
---------- ----------
@ -582,7 +582,7 @@ class Corr:
return return
def dump(self, filename): def dump(self, filename):
"""Dumps the Corr into a pickel file """Dumps the Corr into a pickle file
Parameters Parameters
---------- ----------

View file

@ -21,7 +21,7 @@ class Fit_result(Sequence):
---------- ----------
fit_parameters : list fit_parameters : list
results for the individual fit parameters, results for the individual fit parameters,
also accesible via indices. also accessible via indices.
""" """
def __init__(self): def __init__(self):
@ -427,7 +427,7 @@ def _standard_fit(x, y, func, silent=False, **kwargs):
raise Exception('x and y input have to have the same length') raise Exception('x and y input have to have the same length')
if len(x.shape) > 2: if len(x.shape) > 2:
raise Exception('Unkown format for x values') raise Exception('Unknown format for x values')
if not callable(func): if not callable(func):
raise TypeError('func has to be a function.') raise TypeError('func has to be a function.')

View file

@ -175,7 +175,7 @@ def inv(x):
def cholesky(x): def cholesky(x):
"""Cholesky decompostion of Obs or CObs valued matrices.""" """Cholesky decomposition of Obs or CObs valued matrices."""
return _mat_mat_op(anp.linalg.cholesky, x) return _mat_mat_op(anp.linalg.cholesky, x)

View file

@ -59,7 +59,7 @@ class Obs:
samples : list samples : list
list of numpy arrays containing the Monte Carlo samples list of numpy arrays containing the Monte Carlo samples
names : list names : list
list of strings labeling the indivdual samples list of strings labeling the individual samples
idl : list, optional idl : list, optional
list of ranges or lists on which the samples are defined list of ranges or lists on which the samples are defined
means : list, optional means : list, optional
@ -314,9 +314,9 @@ class Obs:
deltas : list deltas : list
List of fluctuations List of fluctuations
idx : list idx : list
List or range of configs on which the deltas are defined. List or range of configurations on which the deltas are defined.
shape : int shape : int
Number of configs in idx. Number of configurations in idx.
w_max : int w_max : int
Upper bound for the summation window. Upper bound for the summation window.
fft : bool fft : bool
@ -1109,7 +1109,7 @@ def _reduce_deltas(deltas, idx_old, idx_new):
Has to be a subset of idx_old. Has to be a subset of idx_old.
""" """
if not len(deltas) == len(idx_old): if not len(deltas) == len(idx_old):
raise Exception('Lenght of deltas and idx_old have to be the same: %d != %d' % (len(deltas), len(idx_old))) raise Exception('Length of deltas and idx_old have to be the same: %d != %d' % (len(deltas), len(idx_old)))
if type(idx_old) is range and type(idx_new) is range: if type(idx_old) is range and type(idx_new) is range:
if idx_old == idx_new: if idx_old == idx_new:
return deltas return deltas