%pylab inline
import sys
sys.path
sys.path.insert(0, '/Users/asaadeldin/Downloads/GitHub/scipy')
from scipy.optimize import quadratic_assignment
Populating the interactive namespace from numpy and matplotlib
from graspy.simulations import er_corr
rho = 0.9
p = 0.5
n = 20
G1, G2 = er_corr(n, p, rho, directed = False, loops = False)
rep = 5
scores = np.zeros(rep)
for i in range(rep):
    res=quadratic_assignment(G1,G2, options={'maximize':True, 'shuffle_input': False})
    scores[i] =res.fun
    
scores
array([168., 168., 168., 168., 168.])
rep = 5
scores = np.zeros(rep)
for i in range(rep):
    res=quadratic_assignment(G1,G2, options={'maximize':True, 'rng': i})
    scores[i] =res.fun
scores
array([174., 162., 164., 168., 164.])