mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01: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
|
||||
prj = (np.ones((length, length)) - (length - 1) * np.identity(length))
|
||||
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]
|
||||
return new_obs
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue