mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53:41 +02:00
Merge branch 'develop' into documentation
This commit is contained in:
commit
50594cb968
3 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ class Covobs:
|
||||||
def errsq(self):
|
def errsq(self):
|
||||||
""" Return the variance (= square of the error) of the Covobs
|
""" Return the variance (= square of the error) of the Covobs
|
||||||
"""
|
"""
|
||||||
return float(np.dot(np.transpose(self.grad), np.dot(self.cov, self.grad)))
|
return np.dot(np.transpose(self.grad), np.dot(self.cov, self.grad)).item()
|
||||||
|
|
||||||
def _set_cov(self, cov):
|
def _set_cov(self, cov):
|
||||||
""" Set the covariance matrix of the covobs
|
""" Set the covariance matrix of the covobs
|
||||||
|
|
|
@ -850,7 +850,7 @@ def create_dobs_string(obsl, name, spec='dobs v1.0', origin='', symbol=[], who=N
|
||||||
for i in range(ncov):
|
for i in range(ncov):
|
||||||
for o in obsl:
|
for o in obsl:
|
||||||
if cname in o.covobs:
|
if cname in o.covobs:
|
||||||
val = o.covobs[cname].grad[i]
|
val = o.covobs[cname].grad[i].item()
|
||||||
if val != 0:
|
if val != 0:
|
||||||
ds += '%1.14e ' % (val)
|
ds += '%1.14e ' % (val)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1521,7 +1521,7 @@ def _covariance_element(obs1, obs2):
|
||||||
if e_name not in obs2.cov_names:
|
if e_name not in obs2.cov_names:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
dvalue += float(np.dot(np.transpose(obs1.covobs[e_name].grad), np.dot(obs1.covobs[e_name].cov, obs2.covobs[e_name].grad)))
|
dvalue += np.dot(np.transpose(obs1.covobs[e_name].grad), np.dot(obs1.covobs[e_name].cov, obs2.covobs[e_name].grad)).item()
|
||||||
|
|
||||||
return dvalue
|
return dvalue
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue