mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-12-15 11:51:50 +01:00
[Fix] more work on typehints
This commit is contained in:
parent
bbf0b689a1
commit
4814675ff6
7 changed files with 56 additions and 43 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue