Skip to content

Commit

Permalink
Multiple bug fixes in tip-based branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Aug 14, 2017
1 parent 71430df commit fb0178b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions skan/csr.py
Expand Up @@ -379,11 +379,12 @@ def _branch_statistics_loop(jgraph, degrees, visited, result):
neighbor = jgraph.neighbors(node)[0]
id0, d0, n0, s0, deg0 = _expand_path(jgraph, node, neighbor,
visited, degrees)
kind = 1 # tip-junct
counts = n0 + 1
values = s0 + jgraph.node_properties[node]
kind = 1 if deg0 > 2 else 0 # tip-junct / tip-tip
counts = n0
values = s0
avg_value = np.nan if counts == 0 else values / counts
result[num_results, :] = (float(node), float(id0), d0,
float(kind), values / counts)
float(kind), avg_value)
num_results += 1
return num_results

Expand Down

0 comments on commit fb0178b

Please sign in to comment.