MCPcopy Index your code
hub / github.com/stumpy-dev/stumpy / naive_nnmark

Function naive_nnmark

tests/test_floss.py:14–21  ·  view source on GitHub ↗
(I)

Source from the content-addressed store, hash-verified

12
13
14def naive_nnmark(I):
15 nnmark = np.zeros(I.shape[0], dtype=np.int64)
16 for i in range(nnmark.shape[0]):
17 j = I[i]
18 nnmark[min(i, j)] = nnmark[min(i, j)] + 1
19 nnmark[max(i, j)] = nnmark[max(i, j)] - 1
20
21 return np.cumsum(nnmark)
22
23
24def naive_iac(width):

Callers 2

naive_cacFunction · 0.85
test_nnmarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected