def check_arrays(*arrays):
    if len(arrays) == 0:
        return None

    n_samples = None
    checked_arrays = []
    for array in arrays:
        # Recast input as float array
        array = np.asarray(array, dtype=np.float)

        if n_samples is None:
            n_samples = array.shape[0]
        if array.shape[0] != n_samples:
            raise ValueError("Found array with dim %d. Expected %d"
                             % (array.shape[0], n_samples))
        if len(array.shape) == 1:
            array = array[:, np.newaxis]

        checked_arrays.append(array)

    return checked_arrays[0] if len(checked_arrays) == 1 else checked_arrays
Checks that:
dataset/ETHPy150Open neurospin/pylearn-parsimony/parsimony/utils/check_arrays.py/check_arrays