mirror of
https://github.com/Findus23/collision-analyisis-and-interpolation.git
synced 2024-09-19 15:13:50 +02:00
generalize rbf interpolator
This commit is contained in:
parent
5595cb5691
commit
648f4f88a1
1 changed files with 2 additions and 1 deletions
|
@ -16,8 +16,9 @@ class RbfInterpolator(BaseInterpolator):
|
||||||
if not alpha.shape:
|
if not alpha.shape:
|
||||||
return self.rbfi(alpha, v, mcode, gamma, wt, wp)
|
return self.rbfi(alpha, v, mcode, gamma, wt, wp)
|
||||||
else:
|
else:
|
||||||
|
size = alpha.shape[0]
|
||||||
results = np.zeros_like(alpha)
|
results = np.zeros_like(alpha)
|
||||||
for x in range(alpha.shape[0]):
|
for x in range(alpha.shape[0]):
|
||||||
for y in range(alpha.shape[0]):
|
for y in range(alpha.shape[0]):
|
||||||
results[99 - x][99 - y] = self.rbfi(alpha[0][x], v[y][0], mcode, gamma, wt, wp)
|
results[size - 1 - x][size - 1 - y] = self.rbfi(alpha[0][x], v[y][0], mcode, gamma, wt, wp)
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Reference in a new issue