Skip to content

Commit

Permalink
remove useless variables
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbtnfr committed Mar 20, 2023
1 parent 0798172 commit de80582
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions skmine/periodic/extract_cycles.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def combine_splits(splits, adj_splits):
else:
# append and combine splits
prev_i = 0
popped = 0
ready = False

while not ready:
Expand All @@ -122,7 +121,6 @@ def combine_splits(splits, adj_splits):
if adj_splits[0][1] <= splits[prev_i][1]:
# first adj ends before current splits
adj_splits.pop(0)
popped += 1
if len(adj_splits) == 0:
ready = True
else:
Expand Down
2 changes: 1 addition & 1 deletion skmine/periodic/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def computeEFromO(self, occs):
occsStar = self.getOccsStar()
oids = [o[-1] for o in occsStar]
occsD = dict(zip(*[oids, occs]))
rEd, rt0 = self.computeEDict(occsD)
rEd, _ = self.computeEDict(occsD)
return [rEd[oo] for oo in oids[1:]]

def getOccsRefs(self, nid=0, pref=[], refs={}, cnref='root', offset=0):
Expand Down
5 changes: 1 addition & 4 deletions skmine/periodic/run_mine.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

numpy.set_printoptions(suppress=True)

OFFSETS_T = [0, 1, -1]
TOP_KEACH = 5
CHECK_HORDER = True

Expand Down Expand Up @@ -127,7 +126,7 @@ def prepare_candidate_nested(cp_det, cmplx_candidates): # pragma : no cover

list_reps = list(itertools.product(*[range(l) for l in lens[:-depth]]))
map_reps = dict([(v, k) for (k, v) in enumerate(list_reps)])
t00, Es = (None, [])
Es = []
for pi, pp in enumerate(list_reps):
t0i = cmplx_candidates[idxs[pi]].getT0()
Ei = cmplx_candidates[idxs[pi]].getE()
Expand Down Expand Up @@ -532,7 +531,6 @@ def run_combine_horizontal(cpool, data_details, dcosts, nkey="V"):
pids_new = [pids[p] for p in numpy.where(Inew)[0]]

keep_cands = {}
drop_overlap = 0
# for each pattern Pa in turn
while len(pids) > 1:
if pids_new is not None:
Expand Down Expand Up @@ -601,7 +599,6 @@ def run_combine_horizontal(cpool, data_details, dcosts, nkey="V"):
patterns_props[i, prop_map["t0i"]] == patterns_props[j, prop_map["t0i"]]):
continue
if len(set(cands[0].getEvOccs()).intersection(cands[1].getEvOccs())) > 0:
drop_overlap += 1
continue

r0 = numpy.min(patterns_props[cand_pids, prop_map["r0"]] -
Expand Down

0 comments on commit de80582

Please sign in to comment.