eelbrain.NDVar.any

NDVar.any(axis=None, **regions)

Compute presence of any value other than zero over given dimensions

Parameters:
  • axis (None | str | Sequence[str] | NDVar) – Dimensions over which to operate. A str is used to specify a single dimension, a tuple of str to specify several dimensions, None to compute whether there are any nonzero values at all. An boolean NDVar with the same dimensions as the data can be used to find nonzero values in specific elements (if the NDVar has cases on a per case basis).

  • **regions – Regions over which to aggregate. For example, to check for nonzero values between time=0.1 and time=0.2, use ndvar.any(time=(0.1, 0.2)).

  • name (str) – Name of the output NDVar (default is the current name).

Returns:

Boolean data indicating presence of nonzero value over specified dimensions. Return a Var if only the case dimension remains, and a boolean if the function collapses over all data.

Return type:

any