Skip to content

Commit

Permalink
Fixed null_model_und_sign error "'An' is not defined"
Browse files Browse the repository at this point in the history
  • Loading branch information
HippocampusGirl committed Nov 2, 2016
1 parent 24df43b commit b02a306
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bct/algorithms/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,9 +974,10 @@ def null_model_und_sign(W, bin_swaps=5, wei_freq=.1):
n = len(W)
np.fill_diagonal(W, 0) # clear diagonal
Ap = (W > 0) # positive adjmat
An = (W < 0) # negative adjmat

if np.size(np.where(Ap.flat)) < (n * (n - 1)):
W_r = randmio_und_signed(W, bin_swaps)
W_r, eff = randmio_und_signed(W, bin_swaps)
Ap_r = W_r > 0
An_r = W_r < 0
else:
Expand Down

0 comments on commit b02a306

Please sign in to comment.