[Fix] more work on typehints

This commit is contained in:
Simon Kuberski 2025-02-17 15:24:18 +01:00
commit 4814675ff6
7 changed files with 56 additions and 43 deletions

View file

@ -827,9 +827,20 @@ def residual_plot(x: ndarray, y: list[Obs], func: Callable, fit_res: list[Obs],
plt.draw()
def error_band(x: list[int], func: Callable, beta: list[Obs]) -> ndarray:
def error_band(x: list[int], func: Callable, beta: Union[Fit_result, list[Obs]]) -> ndarray:
"""Calculate the error band for an array of sample values x, for given fit function func with optimized parameters beta.
Parameters
----------
x : list[int]
A list of sample points where the error band is evaluated.
func : Callable
The function representing the fit model.
beta : Union[Fit_result, list[Obs]]
Optimized fit parameters.
Returns
-------
err : np.array(Obs)