# Path: pyphi/utils.py
# def state_of(nodes, network_state):
# def all_states(n, big_endian=False):
# def np_immutable(a):
# def np_hash(a):
#     def __init__(self, array):
#     def __hash__(self):
#     def __eq__(self, other):
#     def __repr__(self):
# def eq(x, y):
# def combs(a, r):
# def comb_indices(n, k):
# def powerset(iterable, nonempty=False, reverse=False):
# def load_data(directory, num):
#     def get_path(i):  # pylint: disable=missing-docstring
# def time_annotated(func, *args, **kwargs):
# class np_hashable:


import numpy as np
from pyphi import utils
    [1, 1, 0, 0, 0, 0, 0],
    [0, 1, 0, 1, 1, 0, 0],
    [0, 0, 0, 1, 1, 0, 0],
    [0, 0, 0, 0, 0, 1, 1],
    [0, 0, 0, 0, 0, 1, 1]]

cm2 = [
    [1, 1, 0, 0, 0, 0, 0, 1],
    [1, 1, 1, 0, 0, 0, 0, 0],
    [0, 1, 1, 1, 0, 0, 0, 0],
    [0, 0, 1, 1, 1, 0, 0, 0],
    [0, 0, 0, 1, 1, 1, 0, 0],
    [0, 0, 0, 0, 1, 1, 1, 0],
    [0, 0, 0, 0, 0, 1, 1, 1],
    [1, 0, 0, 0, 0, 0, 1, 1]]

cm3 = [[1] * 16] * 16


matrices = [cm0, cm1, cm2, cm3]


class BenchmarkBlockCm():

    params = [0, 1, 2, 3]

    def setup(self, m):
        self.cm = np.array(matrices[m])

    def time_block_cm(self, m):

# Path: pyphi/utils.py
# def state_of(nodes, network_state):
# def all_states(n, big_endian=False):
# def np_immutable(a):
# def np_hash(a):
#     def __init__(self, array):
#     def __hash__(self):
#     def __eq__(self, other):
#     def __repr__(self):
# def eq(x, y):
# def combs(a, r):
# def comb_indices(n, k):
# def powerset(iterable, nonempty=False, reverse=False):
# def load_data(directory, num):
#     def get_path(i):  # pylint: disable=missing-docstring
# def time_annotated(func, *args, **kwargs):
# class np_hashable:


# Path: benchmarks/benchmarks/utils.py
import numpy as np
from pyphi import utils

    [1, 1, 0, 0, 0, 0, 0],
    [0, 1, 0, 1, 1, 0, 0],
    [0, 0, 0, 1, 1, 0, 0],
    [0, 0, 0, 0, 0, 1, 1],
    [0, 0, 0, 0, 0, 1, 1]]

cm2 = [
    [1, 1, 0, 0, 0, 0, 0, 1],
    [1, 1, 1, 0, 0, 0, 0, 0],
    [0, 1, 1, 1, 0, 0, 0, 0],
    [0, 0, 1, 1, 1, 0, 0, 0],
    [0, 0, 0, 1, 1, 1, 0, 0],
    [0, 0, 0, 0, 1, 1, 1, 0],
    [0, 0, 0, 0, 0, 1, 1, 1],
    [1, 0, 0, 0, 0, 0, 1, 1]]

cm3 = [[1] * 16] * 16


matrices = [cm0, cm1, cm2, cm3]


class BenchmarkBlockCm():

    params = [0, 1, 2, 3]

    def setup(self, m):
        self.cm = np.array(matrices[m])

    def time_block_cm(self, m):

        utils.block_cm(self.cm)