Skip to content

Commit

Permalink
Fix new issues filed under #94
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcinnes committed May 9, 2020
1 parent db77f47 commit 2dce7e4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pynndescent/sparse_threaded.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def sparse_current_graph_map_jit(
for i in rows:
if seed_per_row:
seed(rng_state_local, i)
if heap[0, i, 0] < 0.0:
for j in range(n_neighbors - np.sum(heap[0, i] >= 0.0)):
if heap[0][i, 0] < 0.0:
for j in range(n_neighbors - np.sum(heap[0][i] >= 0.0)):
idx = np.abs(tau_rand_int(rng_state_local)) % data.shape[0]

from_inds = inds[indptr[i] : indptr[i + 1]]
Expand Down Expand Up @@ -208,11 +208,11 @@ def sparse_nn_descent_map_jit(
for i in rows:
i -= offset
for j in range(max_candidates):
p = int(new_candidate_neighbors[0, i, j])
p = int(new_candidate_neighbors[0][i, j])
if p < 0:
continue
for k in range(j, max_candidates):
q = int(new_candidate_neighbors[0, i, k])
q = int(new_candidate_neighbors[0][i, k])
if q < 0:
continue

Expand All @@ -238,7 +238,7 @@ def sparse_nn_descent_map_jit(
count += 1

for k in range(max_candidates):
q = int(old_candidate_neighbors[0, i, k])
q = int(old_candidate_neighbors[0][i, k])
if q < 0:
continue

Expand Down

0 comments on commit 2dce7e4

Please sign in to comment.