fix: Conversion of an array with ndim > 0 to a scalar deprecation fixed. (#186)

This commit is contained in:
Fabian Joswig 2023-05-31 16:59:27 +01:00 committed by GitHub
parent 34fe7f44fc
commit ca70c7571b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ class Covobs:
def errsq(self):
""" 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):
""" Set the covariance matrix of the covobs