title: calculation of degree from a weighted adjacency matrix in networkx
body: <p>I have an adjacency matrix with the non zero elements indicating the weights of the link.The weights are decimals. I would like to obtain the node strength of each of the nodes i.e., the sum of the edge weights adjacent to the node and also the weight distribution. I tried the following code:</p>
  
  <pre><code>import networkx as nx
  G=nx. Graph(a)  # a is the adjacency matrix.
  w=G.degree()
  </code></pre>
  
  <p>But i get the degree of each node as the answer and not the sum of the weights of the links connected to the node. Any help in this regard will be highly appreciable. I am new to networkx.</p>