mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
refactor: instantiation of Obs in import_jackknife slightly optimized
This commit is contained in:
parent
2ba59f90c0
commit
0f749fd107
1 changed files with 2 additions and 1 deletions
|
@ -1470,7 +1470,8 @@ def import_jackknife(jacks, name, idl=None):
|
||||||
length = len(jacks) - 1
|
length = len(jacks) - 1
|
||||||
prj = (np.ones((length, length)) - (length - 1) * np.identity(length))
|
prj = (np.ones((length, length)) - (length - 1) * np.identity(length))
|
||||||
samples = jacks[1:] @ prj
|
samples = jacks[1:] @ prj
|
||||||
new_obs = Obs([samples], [name], idl=idl)
|
mean = np.mean(samples)
|
||||||
|
new_obs = Obs([samples - mean], [name], idl=idl, means=[mean])
|
||||||
new_obs._value = jacks[0]
|
new_obs._value = jacks[0]
|
||||||
return new_obs
|
return new_obs
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue