Skip to content

Commit 16186ad

Browse files
author
Emi Nomura
committed
Now uses floating point.
1 parent cb3a44b commit 16186ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

brainx/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def format_matrix2(data,s,sc,c,lk,co,idc = [],costlist=[],nouptri = False):
6161

6262
def cost_size(nnodes):
6363
tot_edges = .5*nnodes*(nnodes-1)
64-
65-
costs = np.array(range(tot_edges+1),dtype=float)/tot_edges
64+
65+
costs = np.array(range(int(tot_edges)+1),dtype=float)/tot_edges
6666
edges_short = tot_edges/2
6767
return costs,tot_edges,edges_short
6868

0 commit comments

Comments
 (0)