why create a graph will take lots of memories?

graph_tool: 2.5.7
python: 3.7
os: ubuntu 20.04


I just make a graph, the ‘edges’ inculdes just about 20 data, but when I run this, it takes a lot of memory and the process of python will be killed.
image

What causes this problem? How can I solve this?

Unfortunately, it’s not possible to provide a solution to your problem or an answer to your question with the information provided.

To enable us to understand the situation, you need to provide all the items below:

  1. Your exact graph-tool version.
  2. Your operating system.
  3. A minimal working example that shows the problem.

You provided 1 and 2, but item 3 above is very important! If you provide us only the part of the code that you believe causes the problem, then it is not possible to understand the context that may have contributed to it.

You need to provide us a complete example that runs and reproduces the problem you are observing.

To post code, please use triple back-ticks for proper formatting:

for x in range(100):
    print("hello world")

or upload your files as attachments.

Based on what you wrote I can only guess that the list of edges you are supplying is more than you can handle in memory.