check_function_kwargs

nrv.backend.check_function_kwargs(func: Callable, kwargs: dict) dict[source]

check that the keys of a dictionnary are arguments of a function and return an updated dictionnary with only valide keys

Parameters:
  • func (function) – function to check

  • kwargs (dict) – dictionnary of arguments to check

Returns:

updated kwargs dictionnary

Return type:

dict