diff --git a/pygimli/math/matrix.py b/pygimli/math/matrix.py index ef6f0adc6..b01de30c4 100644 --- a/pygimli/math/matrix.py +++ b/pygimli/math/matrix.py @@ -768,14 +768,18 @@ def __init__(self, CM=None, mesh=None, **kwargs): if isinstance(CM, pgcore.Mesh): CM = covarianceMatrix(CM, **kwargs) - - if CM is None and mesh is not None: + elif CM is None and mesh is not None: CM = covarianceMatrix(mesh, **kwargs) else: pg.critical('Give either CM or mesh') self.Cm05 = createCm05(CM) + def __repr__(self): + return "Geostatistical constraints matrix of size " + \ + "{:d}x{:d} using {:d} eigenvalues".format( + self.rows(), self.cols(), len(self.Cm05.ew)) + @property def spur(self): if self._spur is None: