def test_labelledpointundirectedgraph_view_widget():
    adj_matrix = csr_matrix((1, 1))
    with raises(MenpowidgetsMissingError):
        LabelledPointUndirectedGraph.init_with_all_label(
            pcloud2d, adj_matrix).view_widget()
예제 #2
0
def test_LabelledPointUndirectedGraph_create_with_all_label():
    lgroup = LabelledPointUndirectedGraph.init_with_all_label(points,
                                                              adjacency_matrix)

    assert lgroup.n_labels == 1
    assert 'all' in lgroup.labels
예제 #3
0
def test_LabelledPointUndirectedGraph_has_nan_values():
    points2 = points.copy()
    points2[0, 0] = np.nan
    lgroup = LabelledPointUndirectedGraph.init_with_all_label(points2,
                                                              adjacency_matrix)
    assert lgroup.has_nan_values()
예제 #4
0
def test_LandmarkManager_set_None_key():
    lgroup = LabelledPointUndirectedGraph.init_with_all_label(points, adjacency_matrix)

    man = LandmarkManager()
    man[None] = lgroup
예제 #5
0
def test_LabelledPointUndirectedGraph_has_nan_values():
    points2 = points.copy()
    points2[0, 0] = np.nan
    lgroup = LabelledPointUndirectedGraph.init_with_all_label(
        points2, adjacency_matrix)
    assert lgroup.has_nan_values()
예제 #6
0
def test_LabelledPointUndirectedGraph_create_with_all_label():
    lgroup = LabelledPointUndirectedGraph.init_with_all_label(
        points, adjacency_matrix)

    assert lgroup.n_labels == 1
    assert 'all' in lgroup.labels
예제 #7
0
def test_LandmarkManager_set_None_key():
    lgroup = LabelledPointUndirectedGraph.init_with_all_label(points, adjacency_matrix)

    man = LandmarkManager()
    with raises(ValueError):
        man[None] = lgroup
def labelledpointundirectedgraph_view_widget_test():
    adj_matrix = csr_matrix((1, 1))
    LabelledPointUndirectedGraph.init_with_all_label(
        pcloud2d, adj_matrix).view_widget()