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):