designspace.any_#

designspace.any_(*exprs: BoolExpr) BoolExpr#

Combine conditions with or.

The n-ary counterpart of ds.all_(), for the same reason: Python’s or would coerce the expressions to bools.

Parameters:

*exprs (BoolExpr) – Conditions to combine. With none, the result is the literal False, the identity of or.

Returns:

The disjunction.

Return type:

BoolExpr

Raises:

TypeError – If any argument is not a boolean expression.

Examples

>>> s = ds.space(ds.param("a").bool(), ds.param("b").bool())
>>> s = s.require(ds.any_(ds.param("a"), ds.param("b")))
>>> s.is_feasible({"a": False, "b": True})
True
>>> s.is_feasible({"a": False, "b": False})
False