Because it computes the correlation coefficient of degrees and the correlation coefficient of constant arrays is not defined, networkx library returns np.nan value. But if the degree assortativity coefficient measures the extent to which nodes with similar degrees are connected to each other, because all nodes have the same degree and are connected to each other, it is perfectly assortative.

  • $\begingroup$ Why do you care? I am asking for two reasons: 1) With some background, we do not need to guess what is relevant to you and can give better answers. 2) I would guess that this does not matter in reasonable applications. (If your networks are even close to complete, you cannot perform meaningful (unweighted) network analysis anymore.) — Please edit your question to clarify. $\endgroup$
    – Wrzlprmft
    Commented May 21, 2023 at 18:54
  • $\begingroup$ I want to track changes in the degree assortativity coefficient of the temporal graph to analyze some changes in other parts of the social network. $\endgroup$
    – Neo
    Commented May 29, 2023 at 10:11
  • $\begingroup$ And your social network is actually complete? Even then, what’s wrong with deciding for yourself what makes most sense in the context of your analysis? $\endgroup$
    – Wrzlprmft
    Commented May 29, 2023 at 10:36


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.