From cb1120ab0b39d04e06c6fa60ff9d0ba7dba3dafa Mon Sep 17 00:00:00 2001 From: fjosw Date: Fri, 4 Mar 2022 11:12:15 +0000 Subject: [PATCH] Documentation updated --- docs/pyerrors/obs.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/pyerrors/obs.html b/docs/pyerrors/obs.html index 402457c3..f784f4d0 100644 --- a/docs/pyerrors/obs.html +++ b/docs/pyerrors/obs.html @@ -1665,6 +1665,11 @@ ''' length = len(obs) + + max_samples = np.max([o.N for o in obs]) + if max_samples <= length: + warnings.warn(f"The dimension of the covariance matrix ({length}) is larger or equal to the number of samples ({max_samples}). This will result in a rank deficient matrix.", RuntimeWarning) + cov = np.zeros((length, length)) for i in range(length): for j in range(i, length): @@ -4854,6 +4859,11 @@ Second observable ''' length = len(obs) + + max_samples = np.max([o.N for o in obs]) + if max_samples <= length: + warnings.warn(f"The dimension of the covariance matrix ({length}) is larger or equal to the number of samples ({max_samples}). This will result in a rank deficient matrix.", RuntimeWarning) + cov = np.zeros((length, length)) for i in range(length): for j in range(i, length):