judithabk6 / med_bench

BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

Estimators - Given a wrong estimator name #19

Closed sami6mz closed 1 year ago

sami6mz commented 1 year ago

In get_estimation.py, get_estimation() :

If one sets the wrong estimator name, UnboundLocalError is returned. The variable effects is returned before being assigned. A better approach would be to define effects = [np.nan]*5 at the start of the function. It would avoid repetition. Also, we should produce a Warning in the case of a wrong estimator name.