Beispiel #1
0
def test_kmeans(c):
    da.init_sigs('kmeans', data=c[0:30], J=5, K=5)
Beispiel #2
0
def test_incorrect_naming(c):
    with pytest.raises(AssertionError):
        da.init_sigs('zilch', data=c, J=5, K=5)
Beispiel #3
0
def test_random():
    da.init_sigs('random', J=5, K=5)
Beispiel #4
0
def test_uniform(sig_defs):
    rng = np.random.default_rng(100)
    assert np.all(
        da.init_sigs('uniform', tau=sig_defs, J=5, K=5, rng=rng) ==
        da.init_sigs('uniform', rng=rng)), "Seeding fails with extra args"
Beispiel #5
0
def test_from_tau(sig_defs):
    da.init_sigs('supply_tau', tau=sig_defs, J=5, K=5)