eelbrain.NDVar.aggregate

NDVar.aggregate(self, x=None, func=<function mean at 0x7fb40c742a60>, name=None)

Summarize data in each cell of x.

Parameters:
x : categorial

Categorial whose cells define which cases to aggregate.

func : function with axis argument

Function that is used to create a summary of the cases falling into each cell of x. The function needs to accept the data as first argument and axis as keyword-argument. Default is numpy.mean.

name : str

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

Returns:
aggregated_ndvar : NDVar

NDVar with data aggregated over cells of x.