Split 1D or 2D into two parts, using the last axis

    Parameters
    ----------
    data:
    squeeze : squeeze results to remove unnecessary dimensions

def split_data(data, squeeze=False):
    """
    Split 1D or 2D into two parts, using the last axis

    Parameters
    ----------
    data:
    squeeze : squeeze results to remove unnecessary dimensions
    """
    vdata = np.atleast_2d(data)
    nr_freqs = int(vdata.shape[1] / 2)
    part1 = vdata[:, 0:nr_freqs]
    part2 = vdata[:, nr_freqs:]
    if(squeeze):
        part1 = part1.squeeze()
        part2 = part2.squeeze()
    return part1, part2