def flatten(x):
    """Flatten an array of data.

    This function flattens an array in "C" like order, which is identical
    to the process that TensorFlow's flatten function performs. Batch size is
    not affected

    Parameters
    ----------
    x : numpy.ndarray
        Input data.

    Returns
    -------
    numpy.ndarray
        Flattened array.
    """
    return x.reshape((x.shape[0], -1), order="C")