def create_matrices(data, verbose = False):
    """
    Creates all the matrices for the observations (datasets) and returns both.
    """
    condensed_matrices = {}
    all_observations = {}
    for dataset_name in data.all_datasets:
        dataset = data.all_datasets[dataset_name]
        # Creating the matrix
        observations = dataset_loading_2D(dataset,data.scale_factor[dataset_name])

        all_observations[dataset_name] = observations
        condensed_matrix_data = distance.pdist(observations)
        condensed_matrix = CondensedMatrix(condensed_matrix_data)
        condensed_matrices[dataset_name] = condensed_matrix
        if verbose:
            print "Matrix for %s:"%dataset_name
            print "-----------------------"
            print "Max dist. = ",condensed_matrix.calculateMax()
            print "Min dist. = ",condensed_matrix.calculateMin()
            print "Mean dist. = ",condensed_matrix.calculateMean()
            print "Variance = ",condensed_matrix.calculateVariance()
            print "-----------------------\n"
    return condensed_matrices, all_observations
dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/validation/bidimensional/validationTools.py/create_matrices/original