lib.parameter.find_names

lib.parameter.find_names(allnames, name, quiet=True)

Search parameter name name in list of names allnames, matching template forms [::]; return corresponding parameter names. Contrary to find_names_latex(), it does not handle latex strings, but can take a list of parameter names as name (thus returning the concatenated list of matching names in allnames).

>>> find_names(['a_1','a_2','b_1','c_2'],['a_[:]','b_[:]'])
['a_1','a_2','b_1']
Parameters
  • allnames (list) – List of parameter names (strings).

  • name (list, string) – List of parameter name(s) to match in allnames.

  • quiet (bool, default=True) – If False and no match for parameter name was found is allnames, raise ParamError.

Returns

toret – List of parameter names (strings).

Return type

list