wonambi.trans.merge module

Module to merge Data together, along different axis and time points.

It does not merge two instances of Data together (TODO).

wonambi.trans.merge.concatenate(data, axis)[source]

Concatenate multiple trials into one trials, according to any dimension.

Parameters:
  • data (instance of DataTime, DataFreq, or DataTimeFreq) –

  • axis (str) – axis that you want to concatenate (it can be ‘trial’)

Returns:

instace of same class as input – the data will always have only one trial

Notes

If axis is ‘trial’, it will add one more dimension, and concatenate based on it. It will then create a new axis, called ‘trial_axis’ (not ‘trial’ because that axis is hard-coded).

If you want to concatenate across trials, you need:

>>> expand_dims(data1.data[0], axis=1).shape