Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- random
- import numpy as np
- import matplotlib.pyplot as plt
- G = nx.read_edgelist("twitte.txt")
- H = nx.Graph()
- graph_size = G.size()
- graph_order = G.order() #liczba wierzchołków
- print('graph size : ',graph_size)
- print('graph order : ',graph_order)
- print('remove loops')
- G.remove_edges_from(G.selfloop_edges())
- graph_size = G.size()
- graph_order = G.order()
- print('graph size : ',graph_size)
- print('graph order : ',graph_order)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement