Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def estimator(value):
if value.lower() in ['res', 'resid', 'resids', 'residual', 'residuals']:
msg = 'Bootstrapping the residuals is not ready yet'
raise NotImplementedError(msg)
elif value.lower() in ['fit', 'values']:
est = _bs_fit
else:
raise ValueError('estimator must be either "resid" or "fit".')
return est