def test_compute_adjacency_matrix_args(almost_equal_decimals=5):
    """ test the compute_adjacency_matrix parameter arguments """
    input_types = ['data', 'adjacency', 'affinity']
    params = [{'radius':1}, {'radius':2}]
    for adjacency_method in adjacency_methods():
        if adjacency_method == 'pyflann':
            try:
                import pyflann as pyf
            except ImportError:
                raise SkipTest("pyflann not installed.")
        X = np.random.uniform(size=(10, 2))
        D = compute_adjacency_matrix(X, adjacency_method, **params[1])
        A = compute_affinity_matrix(D, radius=1)
        for init_params in params:
            for kwarg_params in params:
                true_params = init_params.copy()
                true_params.update(kwarg_params)
                adjacency_true = compute_adjacency_matrix(X, adjacency_method, **true_params)
                G = Geometry(adjacency_method=adjacency_method, adjacency_kwds=init_params)
                for input in input_types:
                    G = Geometry(adjacency_kwds = init_params)
                    if ['data'] in input:
                        G.set_data_matrix(X)
                        adjacency_queried = G.compute_adjacency_matrix(**kwarg_params)
                        assert_allclose(adjacency_true.toarray(),
                                        adjacency_queried.toarray(), rtol=1E-5)
                    else:
                        if input in ['adjacency']:
                            G.set_adjacency_matrix(D)
                        else:
                            G.set_affinity_matrix(A)
                        msg = distance_error_msg
                        assert_raise_message(ValueError, msg, G.compute_adjacency_matrix)
dataset/ETHPy150Open mmp2/megaman/megaman/geometry/tests/test_geometry.py/test_compute_adjacency_matrix_args/swapped operands of `in`