baybe.parameters.selectors.to_parameter_selector

baybe.parameters.selectors.to_parameter_selector(x: str | type[Parameter] | Collection[str] | Collection[type[Parameter]] | ParameterSelectorProtocol, /)[source]

Convert shorthand notations to parameter selectors.

Convenience converter that allows users to specify parameter selectors using simpler types:

Parameters:

x (str | type[Parameter] | Collection[str] | Collection[type[Parameter]] | ParameterSelectorProtocol) – The object to convert.

Return type:

ParameterSelectorProtocol

Returns:

The corresponding parameter selector.

Raises:

TypeError – If the input cannot be converted to a parameter selector.