def pagerank_weighted_scipy(graph, damping=0.85):
    adjacency_matrix = build_adjacency_matrix(graph)
    probability_matrix = build_probability_matrix(graph)

    pagerank_matrix = damping * adjacency_matrix.todense() + (damping - 1) * probability_matrix
    vals, vecs = eig(pagerank_matrix, left=True, right=False)
    return process_results(graph, vecs)
dataset/ETHPy150Open summanlp/textrank/summa/pagerank_weighted.py/pagerank_weighted_scipy/swapped operands of `-`