colour.utilities.xp_select#
- colour.utilities.xp_select(condlist: Any, choicelist: Any, *, default: Any = 0, xp: ProtocolArrayNamespace | ModuleType | None = None) NDArrayFloat[source]#
Array API compatible implementation of
numpy.select().- Parameters:
condlist (Any) – List of boolean arrays for conditions.
choicelist (Any) – List of arrays from which output elements are taken.
default (Any) – Value used when all conditions are
False.xp (ProtocolArrayNamespace | ModuleType | None) – Array namespace module. If None, derived from
condlistandchoicelist.
- Returns:
Array with elements from choicelist where condlist is
True.- Return type: