# Path: pyamg/gallery/example.py
# def load_example(name):
#     """Load an example problem by name.
# 
#     Parameters
#     ----------
#     name : string (e.g. 'airfoil')
#         Name of the example to load
# 
#     Notes
#     -----
#     Each example is stored in a dictionary with the following keys:
#         - 'A'        : sparse matrix
#         - 'B'        : near-nullspace candidates
#         - 'vertices' : dense array of nodal coordinates
#         - 'elements' : dense array of element indices
# 
#     Current example names are:%s
# 
#     Examples
#     --------
#     >>> from pyamg.gallery import load_example
#     >>> ex = load_example('knot')
# 
#     """
#     if name not in example_names:
#         raise ValueError(f'No example with name {name}')
# 
#     return loadmat(os.path.join(example_dir, name + '.mat'), struct_as_record=True)


import numpy as np
import pyamg.amg_core as amg_core
import scipy.sparse as sparse
from pyamg.gallery import load_example
from numpy.testing import TestCase, assert_equal, assert_array_equal
                       [1, 2],
                       [1, 1],
                       [2, 0],
                       [2, 1],
                       [2, 2],
                       [2, 3],
                       [3, 2],
                       [3, 1],
                       [3, 0],
                       [4, 0]])
        del xy
        G = np.zeros((12, 12))
        G[0, [1]] = 1
        G[1, [2, 7]] = 1
        G[2, [0, 3]] = 1
        G[3, [5]] = 1
        G[4, [10]] = 1
        G[5, [4, 6]] = 1
        G[6, [2]] = 1
        G[7, [6]] = 1
        G[8, [6]] = 1
        G[9, [5, 8]] = 1
        G[10, [9, 11]] = 1
        G[11, [9]] = 1
        G = sparse.csr_matrix(G)
        np.random.seed(1664236979)
        G.data[:] = np.random.rand(len(G.data)) * 2
        cases.append(G)

        # (4) 191 node unstructured finite element matrix

# Path: pyamg/gallery/example.py
# def load_example(name):
#     """Load an example problem by name.
# 
#     Parameters
#     ----------
#     name : string (e.g. 'airfoil')
#         Name of the example to load
# 
#     Notes
#     -----
#     Each example is stored in a dictionary with the following keys:
#         - 'A'        : sparse matrix
#         - 'B'        : near-nullspace candidates
#         - 'vertices' : dense array of nodal coordinates
#         - 'elements' : dense array of element indices
# 
#     Current example names are:%s
# 
#     Examples
#     --------
#     >>> from pyamg.gallery import load_example
#     >>> ex = load_example('knot')
# 
#     """
#     if name not in example_names:
#         raise ValueError(f'No example with name {name}')
# 
#     return loadmat(os.path.join(example_dir, name + '.mat'), struct_as_record=True)


# Path: pyamg/tests/test_clustering.py
import numpy as np
import pyamg.amg_core as amg_core
import scipy.sparse as sparse
from pyamg.gallery import load_example
from numpy.testing import TestCase, assert_equal, assert_array_equal

                       [1, 2],
                       [1, 1],
                       [2, 0],
                       [2, 1],
                       [2, 2],
                       [2, 3],
                       [3, 2],
                       [3, 1],
                       [3, 0],
                       [4, 0]])
        del xy
        G = np.zeros((12, 12))
        G[0, [1]] = 1
        G[1, [2, 7]] = 1
        G[2, [0, 3]] = 1
        G[3, [5]] = 1
        G[4, [10]] = 1
        G[5, [4, 6]] = 1
        G[6, [2]] = 1
        G[7, [6]] = 1
        G[8, [6]] = 1
        G[9, [5, 8]] = 1
        G[10, [9, 11]] = 1
        G[11, [9]] = 1
        G = sparse.csr_matrix(G)
        np.random.seed(1664236979)
        G.data[:] = np.random.rand(len(G.data)) * 2
        cases.append(G)

        # (4) 191 node unstructured finite element matrix

        cases.append(load_example('unit_square')['A'])