def attribute_assortativity_coefficient(G,attribute,nodes=None):
    M = attribute_mixing_matrix(G,attribute,nodes)
    return attribute_ac(M)
Compute assortativity for node attributes.
dataset/ETHPy150Open networkx/networkx/networkx/algorithms/assortativity/correlation.py/attribute_assortativity_coefficient