Пример #1
0
def test_wrp_notimplemented_string_weights():
    wrp = WeightedRipsPersistence(weights="foo")

    with pytest.raises(ValueError,
                       match="'foo' passed for `weights` but the "
                       "only allowed string is 'DTM'"):
        wrp.fit(X_pc)
Пример #2
0
def test_wrp_notimplemented_p():
    wrp = WeightedRipsPersistence(weight_params={'p': 1.2})

    with pytest.raises(ValueError):
        wrp.fit(X_pc)