Skip to content

Commit

Permalink
MAINT: Employ the linear combination directly from kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
jwboth committed Apr 17, 2024
1 parent a6f3ec3 commit 6d824c1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/darsia/signals/models/kernelinterpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,6 @@ def __call__(self, signal: np.ndarray) -> np.ndarray:
np.ndarray: interpolated signal
"""
# NOTE: Shape is not clear at input as it may be used via advenced indexing
output = self.interpolation_weights[0] * self.kernel(signal, self.supports[0])
for n in range(1, self.num_supports):
output += self.interpolation_weights[n] * self.kernel(
signal, self.supports[n]
)
return output
return self.kernel.linear_combination(
signal, self.supports, self.interpolation_weights
)

0 comments on commit 6d824c1

Please sign in to comment.