Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Timeit Python. How does it work?
- import maxcut as mc
- import networkx as nx
- G = nx.complete_graph(3)
- mc.largest_eigenvector(G)
- s = """
- import maxcut as mc
- import networkx as nx
- G = nx.complete_graph(3)
- """
- t = timeit.Timer(s, 'mc.largest_eigenvector(G)')
- def tmp():
- import maxcut as mc
- import networkx as nx
- G = nx.complete_graph(3)
- mc.largest_eigenvector(G)
- t = timeit.Timer(s, 'tmp()')
- t = timeit.Timer(setup=s, stmt='mc.largest_eigenvector(G)')
Add Comment
Please, Sign In to add comment