1
0
Fork 0
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:
Lukas Winkler 2019-08-01 15:23:20 +02:00
parent 5595cb5691
commit 648f4f88a1
Signed by: lukas
GPG key ID: 54DE4D798D244853

View file

@ -16,8 +16,9 @@ class RbfInterpolator(BaseInterpolator):
if not alpha.shape:
return self.rbfi(alpha, v, mcode, gamma, wt, wp)
else:
size = alpha.shape[0]
results = np.zeros_like(alpha)
for x 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