Skip to content

Commit

Permalink
update from_numpy_array to support networkx > 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
omerwe committed Mar 5, 2024
1 parent ac63a4c commit de147d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion finemapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ def estimate_h2_hess(self, prop_keep=0.005, R_cutoff=0.99, pvalue_bound=None):
#take a maximally independent subset
np.fill_diagonal(R_pot_csnp,0)
import networkx as nx
G = nx.from_numpy_matrix(np.abs(R_pot_csnp)>R_cutoff)
G = nx.from_numpy_array(np.abs(R_pot_csnp)>R_cutoff)
np.fill_diagonal(R_pot_csnp,1)
inds = np.sort(nx.maximal_independent_set(G))

Expand Down

0 comments on commit de147d6

Please sign in to comment.