Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _merge_x_and_fit_params(self, x, fit_params):
duplicates = duplicate_items(x, fit_params)
if duplicates:
msg = "X and fit_params contain duplicate keys: "
msg += ', '.join(duplicates)
raise ValueError(msg)
x_dict = dict(x) # shallow copy
x_dict.update(fit_params)
return x_dict
def _merge_x_and_fit_params(self, x, fit_params):
duplicates = duplicate_items(x, fit_params)
if duplicates:
msg = "X and fit_params contain duplicate keys: "
msg += ', '.join(duplicates)
raise ValueError(msg)
x_dict = dict(x) # shallow copy
x_dict.update(fit_params)
return x_dict