Skip to content

Commit

Permalink
ENH: add string representation of GeostatisticConstraintsMatrix and f…
Browse files Browse the repository at this point in the history
…ix input bug
  • Loading branch information
halbmy committed Jan 23, 2025
1 parent 6f57af6 commit 07d1a73
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pygimli/math/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 07d1a73

Please sign in to comment.