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

Function apply_include

tests/naive.py:534–551  ·  view source on GitHub ↗
(D, include)

Source from the content-addressed store, hash-verified

532
533
534def apply_include(D, include):
535 restricted_indices = []
536 unrestricted_indices = []
537 mask = np.ones(include.shape[0], bool)
538
539 for i in range(include.shape[0]):
540 if include[i] < include.shape[0]:
541 restricted_indices.append(include[i])
542 if include[i] >= include.shape[0]:
543 unrestricted_indices.append(include[i])
544
545 restricted_indices = np.array(restricted_indices, dtype=np.int64)
546 unrestricted_indices = np.array(unrestricted_indices, dtype=np.int64)
547 mask[restricted_indices] = False
548 tmp_swap = D[: include.shape[0]].copy()
549
550 D[: include.shape[0]] = D[include]
551 D[unrestricted_indices] = tmp_swap[mask]
552
553
554def multi_distance_profile(

Callers 2

multi_distance_profileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected