Skip to content

Commit 66b7f94

Browse files
AxMeNilachlangrose
authored andcommitted
added a logger warning for the default weights of the normal constraint
1 parent 45af13c commit 66b7f94

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

LoopStructural/interpolators/_geological_interpolator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def set_normal_constraints(self, points: np.ndarray):
154154
----------
155155
points : np.ndarray
156156
array containing the value constraints usually 7-8 columns.
157-
X,Y,Z,nx,ny,nz,(weight)
157+
X,Y,Z,nx,ny,nz,(weight, default : 1 for each row)
158158
159159
Returns
160160
-------
@@ -166,6 +166,8 @@ def set_normal_constraints(self, points: np.ndarray):
166166
"""
167167
if points.shape[1] == self.dimensions * 2:
168168
points = np.hstack([points, np.ones((points.shape[0], 1))])
169+
logger.warning(f"No weight provided for normal constraints, all weights are set to 1")
170+
raise Warning
169171
if points.shape[1] < self.dimensions * 2 + 1:
170172
raise ValueError("Normal constraints must at least have X,Y,Z,nx,ny,nz")
171173
self.n_n = points.shape[0]

0 commit comments

Comments
 (0)