mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
tests: test for corr matrix initialization with none entries added.
This commit is contained in:
parent
8dacb9faa2
commit
dce7d4bec8
1 changed files with 15 additions and 0 deletions
|
@ -296,3 +296,18 @@ def test_thin():
|
|||
thin.fit(lambda a, x: a[0] * x)
|
||||
c.thin(offset=1)
|
||||
c.thin(3, offset=1)
|
||||
|
||||
|
||||
def test_corr_matrix_none_entries():
|
||||
dim = 8
|
||||
x = np.arange(dim)
|
||||
y = 2 * np.exp(-0.06 * x) + np.random.normal(0.0, 0.15, dim)
|
||||
yerr = [0.1] * dim
|
||||
|
||||
oy = []
|
||||
for i, item in enumerate(x):
|
||||
oy.append(pe.pseudo_Obs(y[i], yerr[i], 'test'))
|
||||
|
||||
corr = pe.Corr(oy)
|
||||
corr = corr.deriv()
|
||||
pe.Corr(np.array([[corr, corr], [corr, corr]]))
|
||||
|
|
Loading…
Add table
Reference in a new issue