# Path: pyphi/distance.py
# _NUM_PRECOMPUTED_HAMMING_MATRICES = 10
#     N = d1.squeeze().ndim
# class MeasureRegistry(Registry):
# class np_suppress(np.errstate, ContextDecorator):
#     def __init__(self):
#     def register(self, name, asymmetric=False):
#         def register_func(func):
#     def asymmetric(self):
#     def __init__(self):
# def _hamming_matrix(N):
# def _compute_hamming_matrix(N):
# def hamming_emd(d1, d2):
# def effect_emd(d1, d2):
# def l1(d1, d2):
# def kld(d1, d2):
# def entropy_difference(d1, d2):
# def psq2(d1, d2):
#     def f(p):
# def mp2q(p, q):
# def intrinsic_difference(p, q):
# def absolute_intrinsic_difference(p, q):
# def directional_emd(direction, d1, d2):
# def repertoire_distance(direction, r1, r2):
# def system_repertoire_distance(r1, r2):
# def pointwise_mutual_information(p, q):
# def weighted_pointwise_mutual_information(p, q):
# def probability_distance(p, q, measure=None):


import pytest
from pyphi import distance
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# test/test_registry.py




def test_registry():
    registry = distance.Registry()

    assert "DIFF" not in registry
    assert len(registry) == 0

    @registry.register("DIFF")
    def difference(a, b):

# Path: pyphi/distance.py
# _NUM_PRECOMPUTED_HAMMING_MATRICES = 10
#     N = d1.squeeze().ndim
# class MeasureRegistry(Registry):
# class np_suppress(np.errstate, ContextDecorator):
#     def __init__(self):
#     def register(self, name, asymmetric=False):
#         def register_func(func):
#     def asymmetric(self):
#     def __init__(self):
# def _hamming_matrix(N):
# def _compute_hamming_matrix(N):
# def hamming_emd(d1, d2):
# def effect_emd(d1, d2):
# def l1(d1, d2):
# def kld(d1, d2):
# def entropy_difference(d1, d2):
# def psq2(d1, d2):
#     def f(p):
# def mp2q(p, q):
# def intrinsic_difference(p, q):
# def absolute_intrinsic_difference(p, q):
# def directional_emd(direction, d1, d2):
# def repertoire_distance(direction, r1, r2):
# def system_repertoire_distance(r1, r2):
# def pointwise_mutual_information(p, q):
# def weighted_pointwise_mutual_information(p, q):
# def probability_distance(p, q, measure=None):


# Path: test/test_registry.py
import pytest
from pyphi import distance

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# test/test_registry.py




def test_registry():
    registry = distance.Registry()

    assert "DIFF" not in registry
    assert len(registry) == 0

    @registry.register("DIFF")
    def difference(a, b):

        return a - b