mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-17 13:03:42 +02:00
bugs in derived_array and gamma_method fixed which caused odd behaviour
in connection with irregular monte carlo chains
This commit is contained in:
parent
17f7753225
commit
0644ecf9aa
2 changed files with 3 additions and 3 deletions
|
@ -248,7 +248,7 @@ class Obs:
|
|||
|
||||
r_length = []
|
||||
for r_name in e_content[e_name]:
|
||||
if self.idl[r_name] is range:
|
||||
if isinstance(self.idl[r_name], range):
|
||||
r_length.append(len(self.idl[r_name]))
|
||||
else:
|
||||
r_length.append((self.idl[r_name][-1] - self.idl[r_name][0] + 1))
|
||||
|
@ -339,7 +339,7 @@ class Obs:
|
|||
idx -- List or range of configs on which the deltas are defined.
|
||||
shape -- Number of configs in idx.
|
||||
"""
|
||||
if type(idx) is range:
|
||||
if isinstance(idx, range):
|
||||
return deltas
|
||||
else:
|
||||
ret = np.zeros(idx[-1] - idx[0] + 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue