File: test_find_overlap_list.py

package info (click to toggle)
python-ncls 0.0.63-hotfix%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 372 kB
  • sloc: ansic: 2,412; python: 205; sh: 18; makefile: 5
file content (27 lines) | stat: -rw-r--r-- 546 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27



from ncls import NCLS

import pickle
import pandas as pd
import numpy as np

# starts = np.random.randint(0, int(1e8), int(1e3))
starts = np.array(range(100))
ends = starts + 100
ids = starts

ncls = NCLS(starts, ends, ids)

starts2 = np.array([0, 10, 20, 40000], dtype=np.long)
ends2 = np.array([5, 15, 25, 50000], dtype=np.long)
indexes2 = np.array([0, 1, 2, 3], dtype=np.long)


print(starts)
print(ncls.has_overlaps(starts2, ends2, indexes2))

# for i in range(0, 100):
#     for j in ncls.find_overlap_list(i, i + 10):
#         print(j)