MCPcopy
hub / github.com/stumpy-dev/stumpy / test_stimp

Function test_stimp

tests/test_non_normalized_decorator.py:414–441  ·  view source on GitHub ↗
(T, m)

Source from the content-addressed store, hash-verified

412
413@pytest.mark.parametrize("T, m", test_data)
414def test_stimp(T, m):
415 if T.ndim > 1:
416 T = T.copy()
417 T = T[0]
418 n = 3
419 seed = np.random.randint(100000)
420
421 np.random.seed(seed)
422 ref = aamp_stimp(T, m)
423 for i in range(n):
424 ref.update()
425
426 np.random.seed(seed)
427 cmp = stimp(T, m, normalize=False)
428 for i in range(n):
429 cmp.update()
430
431 # Compare raw pan
432 ref_PAN = ref._PAN
433 cmp_PAN = cmp._PAN
434
435 naive.replace_inf(ref_PAN)
436 naive.replace_inf(cmp_PAN)
437
438 npt.assert_almost_equal(ref_PAN, cmp_PAN)
439
440 # Compare transformed pan
441 npt.assert_almost_equal(ref.PAN_, cmp.PAN_)
442
443
444@pytest.mark.filterwarnings("ignore:\\s+Port 8787 is already in use:UserWarning")

Callers

nothing calls this directly

Calls 3

aamp_stimpClass · 0.90
stimpClass · 0.90
updateMethod · 0.45

Tested by

no test coverage detected