0

I am trying to create a graph F with a degree sequence of another graph G. The code is this

import networkx as nx
import matplotlib.pyplot as plt


# some code 
    deg_sequence = nx.degree(G).values()   
    print nx.is_valid_degree_sequence(deg_sequence)
    F = nx.random_degree_sequence_graph(deg_sequence, seed=None, tries=10)

but I get this error

True
AttributeError: 'module' object has no attribute 'random_degree_sequence_graph'

I just updated Networkx. Am I doing something wrong?

1
  • What does print nx.__version__ tell you? My networkx 1.6 has that method. Commented Nov 25, 2011 at 3:25

1 Answer 1

1

I searched the documentation for nx.random_degree_sequence_graph, and it is a new function in version1.6 .

try:

easy_install networkx==1.6

:)

Sign up to request clarification or add additional context in comments.

2 Comments

I already have it, I did easy_install networkx a few hours ago, bust still doesn't work
maybe have an older version of networkx? check the version first

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.