Skip to content
Snippets Groups Projects
Commit 1954942a authored by Timo Specht's avatar Timo Specht
Browse files

:white_check_mark: fixed test for parallel de_caes

parent f2cf507b
No related branches found
No related tags found
1 merge request!12TESTS BABY
......@@ -73,25 +73,6 @@ cases_de_caes = [
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[0.6731780616078136], [0.8925619834710743]], 0.18181818181818182)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[0.742612328777006], [0.9305172941536578]], 0.19191919191919193)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[0.8145942642422597], [0.9672482399755129]], 0.20202020202020204)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[0.8890001947853189], [1.002754820936639]], 0.21212121212121213)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[0.9657064471879289], [1.0370370370370372]], 0.22222222222222224)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.0445893482318338], [1.0700948882767065]], 0.23232323232323235)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.1255252246987784], [1.1019283746556474]], 0.24242424242424243)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.2083904033705075], [1.1325374961738597]], 0.25252525252525254)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.2930612110287658], [1.1619222528313438]], 0.26262626262626265)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.3794139744552971], [1.1900826446280994]], 0.27272727272727276)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.4673250204318469], [1.2170186715641262]], 0.2828282828282829)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.5566706757401583], [1.2427303336394246]], 0.29292929292929293)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.647327267161978], [1.2672176308539946]], 0.30303030303030304)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.7391711214790495], [1.290480563207836]], 0.31313131313131315)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.832078565473117], [1.3125191307009487]], 0.32323232323232326)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[1.925925925925926], [1.3333333333333333]], 0.33333333333333337)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[2.020589529619221], [1.3529231711049896]], 0.3434343434343435)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[2.1159457033347455], [1.3712886440159169]], 0.3535353535353536)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[2.211870773854245], [1.3884297520661155]], 0.36363636363636365)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[2.3082410679594645], [1.4043464952555864]], 0.37373737373737376)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[2.4049329124321477], [1.4190388735843282]], 0.38383838383838387)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[2.5018226340540393], [1.4325068870523412]], 0.393939393939394)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[2.5987865596068844], [1.4447505356596269]], 0.4040404040404041)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[2.6957010158724275], [1.4557698194061832]], 0.4141414141414142)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[2.792442329632413], [1.4655647382920107]], 0.42424242424242425)
......@@ -127,30 +108,6 @@ cases_de_caes = [
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.000751314800901], [1.190082644628099]], 0.7272727272727273)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.030783294633922], [1.1619222528313435]], 0.7373737373737375)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.0566845889772125], [1.1325374961738597]], 0.7474747474747475)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.0783315246125165], [1.101928374655647]], 0.7575757575757577)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.09560042832158], [1.0700948882767063]], 0.7676767676767677)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.108367626886146], [1.037037037037037]], 0.7777777777777778)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.116509447087959], [1.0027548209366388]], 0.787878787878788)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.119902215708766], [0.9672482399755126]], 0.797979797979798)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.11842225953031], [0.9305172941536575]], 0.8080808080808082)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.111945905334335], [0.8925619834710742]], 0.8181818181818182)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.100349479902587], [0.853382307927762]], 0.8282828282828284)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.083509310016809], [0.8129782675237217]], 0.8383838383838385)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.061301722458747], [0.7713498622589532]], 0.8484848484848485)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.033603044010145], [0.7284970921334554]], 0.8585858585858587)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[5.000289601452748], [0.6844199571472297]], 0.8686868686868687)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.9612377215683], [0.639118457300275]], 0.8787878787878789)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.9163237311385455], [0.5925925925925923]], 0.888888888888889)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.8654239569452296], [0.5448423630241805]], 0.8989898989898991)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.808414725770097], [0.49586776859504095]], 0.9090909090909092)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.745172364394893], [0.4456688093051728]], 0.9191919191919192)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.675573199601359], [0.3942454851545756]], 0.9292929292929294)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.599493558171243], [0.34159779614325037]], 0.9393939393939394)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.516809766886288], [0.2877257422711962]], 0.9494949494949496)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.427398152528241], [0.23262932353841406]], 0.9595959595959597)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.331135041878843], [0.17630853994490342]], 0.9696969696969697)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.2278967617198395], [0.11876339149066369]], 0.9797979797979799)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.117559638832978], [0.05999387817569608]], 0.98989898989899)
, ([[0, 0, 8, 4], [0, 2, 2, 0]], [[4.0], [0.0]], 1.0)
]
......@@ -318,7 +275,7 @@ def test_parametrized_for_de_caes(m, res, t):
@pytest.mark.parametrize('m, res, ts', cases_parallel)
def test_parametrized_for_de_caes(m, res, ts):
def test_parametrized_for_de_caes_parallel(m, res, ts):
tmp = list(parallel_decaes_unblossomed(np.array(m, dtype=float), ts))
tmp = [[pytest.approx(list(t[0])), pytest.approx(list(t[1]))] for t in tmp]
tmp = [[pytest.approx(list(t[0]), rel=1e-5), pytest.approx(list(t[1]), rel=1e-5)] for t in tmp]
assert res == tmp
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment