Concatenate trials along time axis.

    Parameters
    ----------
    x3d : array, shape (t, m, n)
        Segmented input data with t trials, m signals, and n samples.

    Returns
    -------
    x2d : array, shape (m, t * n)
        Trials are concatenated along the second axis.

    See also
    --------
    cut_segments : Cut segments from continuous data.

    Examples
    --------
    >>> x = np.random.randn(6, 4, 150)
    >>> y = cat_trials(x)
    >>> y.shape
    (4, 900)

def cat_trials(x3d):
    """Concatenate trials along time axis.

    Parameters
    ----------
    x3d : array, shape (t, m, n)
        Segmented input data with t trials, m signals, and n samples.

    Returns
    -------
    x2d : array, shape (m, t * n)
        Trials are concatenated along the second axis.

    See also
    --------
    cut_segments : Cut segments from continuous data.

    Examples
    --------
    >>> x = np.random.randn(6, 4, 150)
    >>> y = cat_trials(x)
    >>> y.shape
    (4, 900)
    """
    x3d = atleast_3d(x3d)
    t = x3d.shape[0]
    return np.concatenate(np.split(x3d, t, 0), axis=2).squeeze(0)