(D, include)
| 532 | |
| 533 | |
| 534 | def 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 | |
| 554 | def multi_distance_profile( |
no outgoing calls
no test coverage detected