Skip to content

Commit fd03ce0

Browse files
committed
Make arguments keyword-only
1 parent f4eae0e commit fd03ce0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/harmonica/_euler_methods.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ class EulerInversion:
287287

288288
def __init__(
289289
self,
290+
*,
290291
structural_index=None,
291292
max_iterations=20,
292293
tol=0.1,
@@ -297,7 +298,7 @@ def __init__(
297298
self.tol = tol
298299
self.euler_misfit_balance = euler_misfit_balance
299300

300-
def fit(self, coordinates, data, weights=(1, 0.1, 0.1, 0.025)):
301+
def fit(self, coordinates, data, *, weights=(1, 0.1, 0.1, 0.025)):
301302
"""
302303
Fit the model using potential field measurements and their derivatives.
303304
@@ -351,7 +352,7 @@ def fit(self, coordinates, data, weights=(1, 0.1, 0.1, 0.025)):
351352
tol=self.tol,
352353
euler_misfit_balance=self.euler_misfit_balance,
353354
)
354-
euler.fit(coordinates, data, weights)
355+
euler.fit(coordinates, data, weights=weights)
355356
candidates.append(euler)
356357
best = candidates[np.argmin([e.data_misfit_ for e in candidates])]
357358
self.structural_index_ = best.structural_index

0 commit comments

Comments
 (0)