bundles / scipy 1.18.0 / scipy / cluster / hierarchy / _hierarchy_impl / _lazy_valid_checks
function
scipy.cluster.hierarchy._hierarchy_impl:_lazy_valid_checks
Signature
def _lazy_valid_checks(*args, throw = False, warning = False, materialize = False, xp)Summary
Validate a set of conditions on the contents of possibly lazy arrays.
Parameters
args: tuples of (Array, str)The first element of each tuple must be a 0-dimensional Array that evaluates to bool; the second element must be the message to convey if the first element evaluates to True.
throw: boolSet to True to
raise ValueError(args[i][1])ifargs[i][0]is True.warning: boolSet to True to issue a warning with message
args[i][1]ifargs[i][0]is True.materialize: boolSet to True to force materialization of lazy arrays when throw=True or warning=True. If the inputs are lazy and materialize=False, ignore the
throwandwarningflags.xp: moduleArray API namespace
Returns
: If xp is an eager backend (e.g. numpy) and all conditions are False, return True.: If throw is True, raise. Otherwise, return False.: If xp is a lazy backend (e.g. Dask or JAX), return a 0-dimensional bool Array.
Aliases
scipy.cluster.hierarchy._hierarchy_impl._lazy_valid_checks