Skip to content

Commit 4682d2d

Browse files
committed
TPS_modified
1 parent 33ecc2f commit 4682d2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pygem/rbf_factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def inv_multi_quadratic_biharmonic_spline(X, r=1):
7777
return result
7878

7979
@staticmethod
80-
def thin_plate_spline(X, r=1):
80+
def thin_plate_spline(X, r=1, k=2):
8181
"""
8282
It implements the following formula:
8383
@@ -93,7 +93,7 @@ def thin_plate_spline(X, r=1):
9393
:rtype: float
9494
"""
9595
arg = X / r
96-
result = arg * arg
96+
result = np.power(arg,k)
9797
result = np.where(arg > 0, result * np.log(arg), result)
9898
return result
9999

0 commit comments

Comments
 (0)