fix: fix type hint of set_array_by_interpolation

This commit is contained in:
TonyCrane 2022-02-15 11:35:22 +08:00
parent 773e013af9
commit 3744844efa
No known key found for this signature in database
GPG key ID: 2313A5058A9C637C

View file

@ -92,12 +92,12 @@ def interpolate(start: T, end: T, alpha: float) -> T:
def set_array_by_interpolation(
arr: list[T],
arr1: list[T],
arr2: list[T],
arr: np.ndarray,
arr1: np.ndarray,
arr2: np.ndarray,
alpha: float,
interp_func: Callable[[T, T, float], T] = interpolate
) -> list[T]:
interp_func: Callable[[np.ndarray, np.ndarray, float], np.ndarray] = interpolate
) -> np.ndarray:
arr[:] = interp_func(arr1, arr2, alpha)
return arr