eelbrain.choose

eelbrain.choose(choice, sources, name=None)[source]

Combine data-objects picking from a different object for each case

Parameters:
  • choice (ArrayLike) – Array of int, specifying for each case from which of the sources the data should be taken.

  • sources (Sequence[Var | NDVar | Factor | Interaction | NestedEffect | Model | Datalist]) – Data that should be combined.

  • name (str) – Name for the new data-object (optional).

Notes

Analogous to numpy.choose(). Only implemented for NDVars at this time.